/* Reset and General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Open sans', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Hero Header */
.hero {
  position: relative;
  height: 60vh;
  background: url('images/DBFtitle.jpg') no-repeat center center/cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.subtitle {
  font-size: 1.5rem;
  font-weight: 400;
}

/* Main Navigation */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 3;
}

.logo-img {
  width: 40px;
  height: auto;
}

#nav-links {
  display: flex;
  list-style: none;
}

#nav-links a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-size: 1.1rem;
}

#nav-links a:hover {
  color: #ddd;
}

#hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* About Me Section */
#about {
  padding: 50px 20px;
  text-align: center;
}

.about-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  max-width: 1000px;
  margin: 0 auto;
  gap: 40px;
}

.about-image {
  flex: 0 0 30%;
}

.profile-img {
  max-width: 100%;
  height: auto;
  display: block;
}

.about-text {
  flex: 0 0 60%;
  text-align: left;
  padding-top: 0;
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 20px;
  padding: 20px;
  max-width: 850px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  width: 100%;
  height: 300px;
  margin: 0;
}

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

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

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.project-card:hover::after {
  opacity: 1;
}

.project-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1rem;
  font-family: "Times New Roman", Times, serif;
  opacity: 0;
  padding: 10px 20px;
  border-radius: 5px;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.project-card:hover .project-title {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-nav {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
}

#lightbox-nav-links {
  display: flex;
  list-style: none;
}

#lightbox-nav-links a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
  font-size: 1rem;
}

#lightbox-nav-links a:hover {
  color: #ddd;
}

#lightbox-hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-content {
  width: 100vw;
  height: 100vh;
  background: white;
  padding: 40px;
  color: #333;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 50%;
  margin-bottom: 20px;
  object-fit: contain;
}

.lightbox-content h3 {
  margin-bottom: 15px;
  font-weight: 700;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: black;
  font-size: 40px;
  cursor: pointer;
  z-index: 1002;
}

.close:hover {
  color: #ddd;
}

#caption {
  color: white;
  text-align: center;
  margin-top: 10px;
  z-index: 1001;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-img {
    max-width: 150px;
  }

  .about-container {
    flex-direction: column;
    align-items: center;
  }

  .about-image {
    flex: 0 0 auto;
    margin-bottom: 20px;
  }

  .about-text {
    flex: 0 0 auto;
    text-align: center;
    padding-top: 0;
  }

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

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  #nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
  }

  #nav-links.active {
    display: flex;
  }

  #nav-links a {
    padding: 15px;
    border-bottom: 1px solid #444;
  }

  #hamburger {
    display: block;
  }

  .project-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 10px;
  }

  .project-card {
    max-width: 100%;
    height: 200px;
  }

  .lightbox-content {
    padding: 20px;
  }

  .lightbox-content img {
    max-height: 40%;
  }

  .lightbox-nav {
    top: 10px;
    left: 10px;
  }

  #lightbox-nav-links {
    display: none;
    flex-direction: column;
    width: 200px;
    background: rgba(0, 0, 0, 0.9);
    position: absolute;
    top: 40px;
    left: 0;
    padding: 10px;
  }

  #lightbox-nav-links.active {
    display: flex;
  }

  #lightbox-nav-links a {
    padding: 10px;
    border-bottom: 1px solid #444;
    margin: 0;
  }

  #lightbox-hamburger {
    display: block;
  }

  .close {
    top: 10px;
    right: 20px;
    font-size: 30px;
  }
}

/* Other Sections */
section {
  padding: 50px 20px;
  text-align: center;
}

h2 {
  margin-bottom: 20px;
  font-weight: 700;
}

a {
  color: #007bff;
}

a:hover {
  text-decoration: underline;
}

#backToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: #000000;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 20px;
  background: #f4f4f4;
}