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

@font-face {
  font-family: "Apple";
  src: url("font/SFUIDisplay-Semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Apple", sans-serif;
  background: #fff;
  color: #333;
}

.header {
  position: sticky;
  top: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 0.2rem solid rgb(205, 205, 205);
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
}

#logo {
  position: relative;
  z-index: 3;
  width: 3rem;
  height: 3rem;
  transition: transform 0.3s ease;
}

#logo:hover {
  transform: scale(1.1);
}

@media (min-width: 768px) {
  #logo { width: 3.5rem; height: 3.5rem; }
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-bottom: 4rem;
}

.title {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
}

#main-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.title h3 {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: normal;
  color: #555;
}

#main-card-section {
  display: flex;
  justify-content: center;
  width: 100%;
}

.card {
  filter: drop-shadow(0.2rem 0.2rem 1rem rgb(205, 205, 205));
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  background-color: rgb(255, 255, 255);
  border-radius: 1rem;
  padding: 2rem;
  transition: filter ease 0.3s;
  gap: 2rem;
  height: auto;
  align-items: center;
}

.card:hover {
  filter: drop-shadow(0.2rem 0.2rem 2rem rgb(173, 173, 173));
}

#image-latest-project {
  flex: 1 1 500px;
  min-width: 300px;
}

#image-latest-project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
}

#text-block-latest-project {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
}

#text-block-latest-project h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

#text-block-latest-project h4 {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1.5rem;
}

#text-block-latest-project ul {
  list-style-type: none;
  line-height: 2rem;
}

ul > li::before { content: '- '; }

.menu {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mbt {
  width: 8rem;
  background-color: rgb(0, 0, 0);
  height: 3rem;
  border-radius: 20px;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, background-color 0.2s;
  font-size: 1rem;
  cursor: pointer;
  user-select: none;
}

.mbt:hover, .mbt.active {
  background: rgb(69, 69, 69);
  transform: scale(1.05);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  width: 100%;
}

.card1 {
  padding: 0;
  border-radius: 10px;
  background-color: transparent;
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
  will-change: transform;
}

.card1:hover {
  transform: translateY(-5px);
  z-index: 2;
}

.card1 > img, 
.card1 > iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: none;
  filter: grayscale(100%);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.card1 > iframe {
  pointer-events: none;
}

.card1 > img {
  cursor: zoom-in;
}

.card1:hover > img,
.card1:hover > iframe {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.ascuns { display: none; }

.card1:not(.ascuns) {
  animation: aparitie 0.5s ease-out;
}

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

@media (max-width: 767px) {
  .container { padding: 0 1.5rem; }
  #image-latest-project { flex-basis: 100%; }
}

.lightbox {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  display: none;
}

.lightbox-content.show {
  display: block;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}