.mobile-menu a.active {
  color: #333;
  font-weight: bold;
}

body {
  margin: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background: #ffffff;
  color: #111;
  scroll-behavior: smooth;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-left a,
.nav-right a {
  text-decoration: none;
  color: #999;
  margin: 0 10px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-left a.active {
  color: #333;
  font-weight: bold;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 1.1rem;
  color: #000;
}

.nav-center a {
  color: inherit;
  text-decoration: none;
}

section {
  display: none;
}

section.active {
  display: block;
}

.hero {
  text-align: center;
  padding: 10vh 5vw;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #555;
  margin-top: 10px;
}

.projects-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4vh 2vw;
  gap: 5vh;
}

.project-preview {
  display: flex;
  width: 90vw;
  max-width: 1000px;
  height: auto;
  aspect-ratio: 16 / 7;
  border: 1px solid #f2f2f2;
  background: #f2f2f2;
  text-decoration: none;
  color: inherit;
}

.project-preview img {
  width: 64%;
  height: 100%;
  object-fit: cover;
}

.project-info {
  width: 36%;
  background-color: #f2f2f2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.project-info h3 {
  font-size: clamp(1rem, 2vw, 1.4rem);
  margin: 0;
}

.project-info span {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: #777;
  margin-top: 8px;
}

/* ========== 1. FULL LANDSCAPE (≥1000px) ========== */
@media (min-width: 1000px) {
  .project-preview {
    display: flex;
    width: 90vw;
    max-width: 1000px;
    aspect-ratio: 16 / 7;
    border: 1px solid #f2f2f2;
    background: #f2f2f2;
    text-decoration: none;
    color: inherit;
    position: static;
  }

  .project-preview img {
    width: 64%;
    height: 100%;
    object-fit: cover;
  }

  .project-info {
    width: 36%;
    background-color: #f2f2f2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: inherit;
  }

  .project-info h3 {
    font-size: 1.4rem;
  }

  .project-info span {
    font-size: 1rem;
    color: #777;
    margin-top: 8px;
  }
}

/* ========== 2. SCALED-DOWN LANDSCAPE (600px–999px) ========== */
@media (min-width: 784px) and (max-width: 784px) {
  .project-preview {
    display: flex;
    width: 95vw;
    max-width: 95vw;
    aspect-ratio: 16 / 8;
    border: 1px solid #f2f2f2;
    background: #f2f2f2;
    text-decoration: none;
    color: inherit;
    position: static;
  }

  .project-preview img {
    width: 60%;
    height: auto;
    object-fit: cover;
  }

  .project-info {
    width: 40%;
    background-color: #f2f2f2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    color: inherit;
  }

  .project-info h3 {
    font-size: 1.1rem;
  }

  .project-info span {
    font-size: 0.9rem;
    color: #777;
    margin-top: 6px;
  }
}

/* ========== 3. PORTRAIT OVERLAY (<600px) ========== */
@media (max-width: 790px) {
  .project-preview {
    display: block;
    width: 95vw;
    max-width: 95vw;
    aspect-ratio: auto;
    position: relative;
    border: 1px solid #f2f2f2;
    background: #f2f2f2;
    text-decoration: none;
    color: inherit;
  }

  .project-preview img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }

  .project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .project-info h3 {
    font-size: 1rem;
  }

  .project-info span {
    font-size: 0.85rem;
    margin-top: 5px;
  }
}

.reverse {
  flex-direction: row-reverse;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #222;
  color: #f2f2f2;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer {
  text-align: center;
  margin-top: 60px;
  font-size: 0.9rem;
  color: #777;
}

.project-preview:hover {
  background-color: #111;
  border-color: #111;
}

.project-preview:hover img {
  transition: color 2s ease;
  filter: brightness(0.6);
}

.project-preview:hover .project-info {
  background-color: #111;
}

.project-preview:hover .project-info h3,
.project-preview:hover .project-info span {
  color: #fff;
}

@media (max-width: 790px) {
  .project-preview {
    flex-direction: column;
    width: 100%;
    max-width: 95vw;
    margin: 0 auto;
    height: auto;
  }

  .project-preview.reverse {
    flex-direction: column;
  }

  .project-preview img,
  .project-info {
    width: 100%;
    height: auto;
  }

  .nav-center {
    position: static;
    left: 0;
    transform: none;
    margin: 0 auto;
  }
}

/* Mobile menu overlay - hidden by default */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 1);
  /* translucent white */
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  /* optional for subtle blur effect */
}

.mobile-menu a {
  font-size: 1.5rem;
  margin: 20px;
  color: black;
  text-decoration: none;
}

/* Hamburger icon - only shown in portrait mode */
.hamburger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/* Portrait mode header changes */
@media (max-width: 790px) {
  .nav-left {
    display: none;
  }

  .nav-right {
    display: block;
  }

  .hamburger {
    display: block;
  }

  .nav-center {
    position: relative;
    left: 0;
    transform: none;
    margin: 0 auto;
  }
}

