* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding-top: 56px;
  line-height: 1.5;
  background-color: #322D29;
  color: #72383D;
  overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background-color: #1e1a17;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 2px solid #72383D;
  z-index: 1000;
}

.nav-brand {
  color: #AC9C8D;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.nav-links a {
  color: #AC9C8D;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.nav-links a:hover {
  background-color: rgba(114, 56, 61, 0.15);
  border-color: #72383D;
}

/* ── Hero ── */
.hero {
  width: 100%;
  padding: 28px 32px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(114, 56, 61, 0.3);
}

.hero h1 {
  margin-bottom: 12px;
}

.hero h1 img {
  display: block;
  margin: 0 auto;
}

.hero p {
  color: #AC9C8D;
  font-size: 15px;
  max-width: 680px;
  margin: 0 auto;
  opacity: 0.75;
}

/* ── Sections ── */
.portfolio-section {
  width: 100%;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(114, 56, 61, 0.25);
}

.portfolio-section h2 {
  color: #AC9C8D;
  font-size: 22px;
  border-bottom: 2px solid #72383D;
  padding-bottom: 8px;
  margin-bottom: 24px;
  margin-top: 0;
}

/* Desktop: horizontal */
.section-content {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Resume buttons ── */
.section-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #3d3530;
  color: #AC9C8D;
  text-decoration: none;
  border: 1px solid #72383D;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.15s;
}

.section-btn:hover {
  background-color: #4a413b;
}

/* ── Certifications ── */
/* Desktop: horizontal */
.certifications {
  display: flex;
  flex-direction: row;
  gap: 40px;
  flex-wrap: wrap;
}

.cert {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #AC9C8D;
}

.cert strong {
  color: #AC9C8D;
  font-size: 14px;
}

.cert span {
  font-size: 12px;
  color: #72383D;
}

/* ── Lab gallery ── */
.lab {
  width: 100%;
}

.lab strong,
.notes strong,
.projects strong {
  display: block;
  color: #AC9C8D;
  font-size: 15px;
  margin-bottom: 12px;
}

.lab-gallery + strong {
  margin-top: 20px;
}

/* Desktop: horizontal */
.lab-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 4px;
}

.lab-img-wrapper {
  width: 180px;
  border: 1px solid rgba(114, 56, 61, 0.4);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lab-img-wrapper:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-3px);
}

.lab-img-wrapper img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.lab-img-caption {
  text-align: center;
  font-size: 13px;
  padding: 6px;
  background-color: #3d3530;
  color: #AC9C8D;
}

/*-hidden sections-*/
.hidden {
  display: none;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1001;
  justify-content: center;
  align-items: center;
}

#lightbox.active {
  display: flex;
}

#lightbox-box {
  background: #2a2521;
  border: 1px solid #72383D;
  border-radius: 10px;
  padding: 16px;
  max-width: 90%;
  text-align: center;
}

#lightbox-box img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

#lightbox-caption {
  margin: 10px 0 6px;
  font-size: 14px;
  color: #AC9C8D;
}

#lightbox-close {
  margin-top: 8px;
  padding: 6px 16px;
  background-color: #72383D;
  color: #AC9C8D;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

#lightbox-close:hover {
  background-color: #8a4548;
}

/* ── Mobile menu toggle (hidden on desktop) ── */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #72383D;
  border-radius: 4px;
  color: #AC9C8D;
  font-size: 20px;
  padding: 4px 10px;
  cursor: pointer;
}

/* ── Mobile (768px and below) ── */
@media (max-width: 768px) {

  .nav-toggle {
    display: block;
  }

  .navbar {
    padding: 0 14px;
  }

  .nav-brand {
    font-size: 14px;
  }

  /* Mobile: stack nav links vertically, hidden by default */
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    background-color: #1e1a17;
    border-bottom: 2px solid #72383D;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 20px;
    border-radius: 0;
    border-bottom: 1px solid rgba(114, 56, 61, 0.25);
    font-size: 14px;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 24px 16px 20px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 13px;
  }

  .portfolio-section {
    padding: 20px 16px;
  }

  .portfolio-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  /* Mobile: stack vertically */
  .section-content {
    flex-direction: column;
    gap: 10px;
  }

  .section-btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }

  /* Mobile: stack vertically */
  .certifications {
    flex-direction: column;
    gap: 20px;
  }

  .cert {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .cert img {
    width: 64px;
  }

  /* Mobile: 2 per row */
  .lab-gallery {
    gap: 10px;
  }

  .lab-img-wrapper {
    width: calc(50% - 5px);
  }

  .lab-img-wrapper img {
    height: 80px;
  }
}
