@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope/Manrope-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/HVTC/HelveticaRegular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica', sans-serif;
  background: #000;
  color: #fff;
}

/* Hide scrollbar */
html::-webkit-scrollbar {
  display: none;
}

html {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Header */
header {
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: filter 0.2s ease;
}

body.overlay-active header {
  filter: blur(0px);
}

.name {
  font-size: 18px;
  font-weight: 400;
}

nav {
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
  padding: 4px 8px;
}

nav a:hover {
  opacity: 0.6;
}

nav a.active {
  border-color: transparent;
}

/* Grid */
.grid {
  padding: 120px 40px 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 60px;
  align-items: start;
  transition: filter 0.2s ease;
}

body.overlay-active .grid {
  filter: blur(0px);
}

.grid-item {
  cursor: pointer;
  margin-bottom: 60px;
}

.thumbnail-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000;
  position: relative;
  display: flex;
  align-items: flex-start;
  transition: transform 0.2s ease;
}

.grid-item:hover .thumbnail-container {
  transform: scale(0.98);
}

.thumbnail {
  width: 100%;
  background: #111;
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.grid-item:hover .thumbnail {
  opacity: 0.85;
}

/* Different aspect ratio classes - now as percentages of the square container */
.thumbnail.ratio-square {
  height: 100%; /* Full square */
}

.thumbnail.ratio-43 {
  height: 75%; /* 4:3 ratio */
}

.thumbnail.ratio-54 {
  height: 80%; /* 5:4 ratio */
}

.thumbnail.ratio-87 {
  height: 87.5%; /* 8:7 ratio */
}

.thumbnail.ratio-32 {
  height: 66.67%; /* 3:2 ratio */
}

.thumbnail.ratio-169 {
  height: 56%; /* 16:9 ratio */
}

.thumbnail.ratio-916 {
  height: 177.78%; /* 9:16 ratio */
}

.thumbnail.ratio-45 {
  height: 125%; /* 4:5 ratio */
}

.thumbnail.ratio-23 {
  height: 150%; /* 2:3 ratio */
}

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

.project-title {
  margin-top: 20px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.5px;
  text-align: left;
}

/* Hide titles on work page grid only */
.grid .project-title {
  display: none;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.overlay.active {
  background: rgba(0, 0, 0, 0.85);
  opacity: 1;
  pointer-events: all;
}

.overlay-content {
  position: relative;
  max-width: 75%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.overlay.active .overlay-content {
  transform: scale(1);
  opacity: 1;
}

.overlay-video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  display: block;
}

.overlay-info {
  margin-top: 12px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  animation: fadeInUp 0.4s ease 0.2s forwards;
}

.overlay-title-wrap {
  display: flex;
  align-items: center;
}

.overlay-title {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.5px;
  color: #fff;
}

.overlay-divider {
  font-size: 12px;
  color: #fff;
  display: none;
}

.overlay-subtitle {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.5px;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-left: 5px;
}

.overlay-subtitle:hover {
  opacity: 0.6;
}

.mute-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mute-toggle:hover {
  opacity: 0.6;
}

.view-project-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}


.view-project-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: fadeIn 0.2s ease 0.2s forwards;
}

.close:hover {
  opacity: 0.6 !important;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 300;
  user-select: none;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: fadeIn 0.2s ease 0.2s forwards;
}

.arrow:hover {
  opacity: 0.6 !important;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.arrow.left {
  left: 80px;
}

.arrow.right {
  right: 80px;
}

/* About page */
.about-content {
  padding: 120px 40px 60px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
}

.about-text {
  max-width: 700px;
}

.about-title {
  font-size: 41px;
  font-weight: 400;
  margin-bottom: 15px;
}

.info-row {
  display: flex;
  gap: 120px;
  margin-top: 168px;
  align-items: flex-start;
}

.bio-text.info-title {
  font-size: 41px;
  margin-bottom: 15px;
}

.info-block {
  text-align: left;
}

.portrait {
  max-width: 300px;
  margin-top: 71px;
}

.bio-text {
  font-size: 18px;
  text-transform: none;
  letter-spacing: 0.5px;
  text-align: left;
  line-height: 1.6;
  color: #fff;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .grid-item {
    margin-bottom: 40px;
  }

  .about-content {
    flex-direction: column;
  }

  .portrait {
    max-width: 100%;
  }
}