body {
  margin: 0;
  font-family:Helvetica, Arial, sans-serif;
  background: #FFFFFF;
  color: #1A110C;
}
header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  z-index: 1000; /* keeps it above other elements */
}

hr {
  width: 100%;
  border: none;
  border-top: 3px solid #1A110C;
}
.info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  margin-top: 5rem;
  align-items: end;
}
img {
  width: 100%;
  height: auto;
  display: block;
}
h1 {
  font-size: 32px;
  font-weight: bold;
  color: #1A110C;
  letter-spacing: -1px;
  margin: 0;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  font-weight: bold;
  color: #F23A07;
  letter-spacing: -1px;
  margin: 0;
  line-height: 1.3;
}

h3 {
  font-size: 60px;
  font-weight: bold;
  color: #1A110C;
  margin: 0rem;
  margin-bottom: 3rem;
  margin-top:3rem;
  letter-spacing: -2.5px;
  line-height: 1.1;
  padding: 1rem;
}
@media (max-width: 768px) {
  h3 {
    font-size: 35px;
    font-weight: bold;
    color: #1A110C;
    margin: 0rem;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    line-height: 1.1;
    padding: 1rem;
  }
}

.button {
  display: block;
  width: auto;
  padding: 0.5rem 0.75rem;
  border: none;
  background: #F23A07;
  color: #FFFFFF;
  font-size: 13px;
  line-height: 16px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease;
}
.button:focus-visible {
  transition: background .2s ease;
  background: #1A110C;
}
.button:hover {
  transition: background .2s ease;
  background: #1A110C;
}
p {
  font-size: 13px;
  font-weight: normal;
  margin: 0;
  line-height: 16px;
}
.plain-text-link {
  color: #F23A07;
  font-weight: bold;
  letter-spacing: -0.5px;
  text-decoration: none;   /* no underline */
  cursor: pointer;         /* keeps the pointer on hover */
}
.plain-text-link:hover {
  color: #1A110C;
  font-weight: bold;
}


/* Projects Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 10%;
  row-gap: 5rem;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}
.gallery-item {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item span {
  display: block;
  font-weight: 100;
  margin-top: 1rem;
  font-size: 15px;
  text-align: left;
}

/* Project page */
.scope {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #1A110C;
}
.project-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 1rem;
}
.project-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 1rem;
}
.project-gallery {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 1rem;
  column-gap: 3rem;
}

/* Sticky Column */
.sidebar {
  position: sticky;
  top: 4rem;
  height: fit-content;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #1A110C;
}

@media (max-width: 768px) {
  .project-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0rem;
  }
  .sidebar   {
    top: 0rem;
    order: -1;
    position:relative;
    margin: 1rem;
  }
  .project-gallery {
    row-gap: 1rem;
    padding: 1rem;
  }
  .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    column-gap: 5%;
    row-gap: 2rem;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
  } 
  .footer {
  display:flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  align-items: flex-start;
  }
}

/* ---------- Pixel Overlay ---------- */
.pixel-image {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(15, 1fr);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.pixel-image .pixel {
  background: #F23A07;
  opacity: 0;
}
.pixel-image .pixel.reveal {
  animation: reveal 0.5s forwards alternate;
  animation-iteration-count: infinite;
}

/* Filtering */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters button {
  background: none;
  border: none;
  color: #F23A07; /* red */
  font-weight: bold;
  font-size: 13px;
  letter-spacing: -0.5px;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 0;
}

.filters button:hover,
.filters button.active {
  color: #1A110C; /* black */
}

.gallery-item.dimmed {
  opacity: 0.3;          /* optional dim */
  transform: scale(0.5); /* shrink size */
  transition: opacity 0.3s ease, transform 0.3s ease;
}



@keyframes reveal {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.header-title {
  display: inline-block;
  transition: color 0.2s ease;
}

.header-logo {
  display: inline-block;
  transition: color 0.2s ease;
}

/* SLIDER */
#columnsRange {
  -webkit-appearance: none; /* remove default styles */
  width: 100px;
  height: 2px;
  background: #1A110C; /* black track */
  cursor: pointer;
}

#columnsRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 10px;
  background: #F23A07; /* red square */
  border: none;
  border-radius: 0;
}

#columnsRange::-moz-range-thumb {
  width: 15px;
  height: 10px;
  background: #F23A07;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.gallery-controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;       /* vertically center slider & buttons */
  flex-wrap: wrap;            /* wrap on small screens */
  padding:1rem;
}

@media (max-width: 768px) {
  #columnsRange::-moz-range-thumb {
    width: 30px;
    height: 10px;
    background: #F23A07;
    border: none;
    border-radius: 0;
    cursor: pointer;
  }

  #columnsRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 10px;
  background: #F23A07; /* red square */
  border: none;
  border-radius: 0;
  }
}