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

html, body {
  font-family: 'Lato', sans-serif;
}

body {
  background-color: #f2f2f2;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("assets/img/texture/texturedark.png");
  background-repeat: repeat;
  background-size: 640px 960px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(242,242,242,0.9);
  backdrop-filter: blur(6px);
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111111;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #111111;
  text-decoration: none;
}

.nav-left {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: rgba(242,242,242,0.97);
  backdrop-filter: blur(8px);
  border: 1px solid #ddd;
  min-width: 160px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 200;
}

.dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
  padding: 11px 20px;
  transition: background 0.2s, color 0.2s;
}

.dropdown a:hover {
  background: #111111;
  color: #f2f2f2;
}

.hero {
  position: relative;
  z-index: 1;
  min-height: 80svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #f2f2f2;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 11vw, 72px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  color: #111111;
}

.hero-sub {
  font-family: 'Lato', sans-serif;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: #111111;
  margin-top: 4px;
}

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

.portfolio {
  position: relative;
  z-index: 1;
  padding: 20px 0 50px;
}

.portfolio-header {
  text-align: center;
  margin-bottom: 10px;
}

.portfolio-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(16px, 4.2vw, 22px);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #111111;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.portfolio-title svg {
  width: 10px;
  height: 10px;
  opacity: 0.6;
  transition: transform 0.35s ease;
}

.portfolio-title.collapsed svg {
  transform: rotate(-90deg);
}

.portfolio-content {
  overflow: hidden;
  max-height: 5000px;
  transition: max-height 0.5s ease, opacity 0.4s ease;
  opacity: 1;
}

.portfolio-content.collapsed {
  max-height: 0;
  opacity: 0;
}

.cat-viewer {
  padding-top: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
}

.cat-nav {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 16px;
  gap: 10px;
}

.cat-arrow {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: 0.2;
}
   
.cat-arrow:hover { opacity: 1; }
.cat-arrow svg {
  width: 25px;
  height:25px;
  stroke: #111111;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-title {
  font-family: 'Lato', sans-serif;
  font-weight: 500;
  font-size: clamp(16px, 4.2vw, 22px);
  letter-spacing: 0.08em;
  color: #111111;
  text-align: center;
  text-transform: capitalize;
}

.cat-panel {
  display: none;
  width: 100%;
  max-width: 560px;
  padding: 0 20px 60px;
  animation: fadeIn 0.38s ease both;
}
.cat-panel.active { display: block; }

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

.ph-grid-single img {
  width: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.25s;
}
.ph-grid-single img:hover { opacity: 0.88; }

.ph-grid-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.ph-grid-multi img {
  width: 100%;
  display: block;
  aspect-ratio: 2/3;
  object-fit: cover;
  object-position: center top;
  cursor: zoom-in;
  transition: opacity 0.25s;
}
.ph-grid-multi img:hover { opacity: 0.88; }

.ph-grid-single + .ph-grid-single,
.ph-grid-multi  + .ph-grid-multi,
.ph-grid-single + .ph-grid-multi,
.ph-grid-multi  + .ph-grid-single { margin-top: 5px; }

.nav-right {
  position: relative;
}

.dropdown.right {
  right: 0;
  left: auto;
}

.about-btn-wrap {
  margin-top: 120px;
  padding: 40px 0 80px;
  text-align: center;
}
.about-btn {
  display: inline-block;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: #f2f2f2;
  background: #111111;
  border: 1px solid #111111;
  padding: 8px 24px;
  text-decoration: none;
  border-radius: 20px;
  transition: background 0.25s, color 0.25s;
}
.about-btn:hover { background: #f2f2f2; color: #111111; }

.footer-bar {
  background: #111111;
  height: 36px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-inner {
  position: relative;
  max-width: 92vw;
  max-height: 92svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; 
}

.lb-img {
  max-width: 90vw;
  max-height: 90svh;
  object-fit: contain;
  display: block;
  transform-origin: center center;
  transition: transform 0.08s ease;
  cursor: zoom-in;
  user-select: none;
  touch-action: none;
  will-change: transform; 
}

.lb-img.zoomed {
  cursor: zoom-out;
}

.lb-img { touch-action: none; }

/* ── Animações de slide do lightbox ── */
#lbImg.slide-out-left  { animation: slideOutLeft  0.25s ease forwards; }
#lbImg.slide-out-right { animation: slideOutRight 0.25s ease forwards; }
#lbImg.slide-in-left   { animation: slideInLeft   0.25s ease forwards; }
#lbImg.slide-in-right  { animation: slideInRight  0.25s ease forwards; }

@keyframes slideOutLeft  { to { transform: translateX(-60px); opacity: 0; } }
@keyframes slideOutRight { to { transform: translateX( 60px); opacity: 0; } }
@keyframes slideInLeft   { from { transform: translateX( 60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRight  { from { transform: translateX(-60px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.lb-close {
  position: fixed;
  top: 18px; right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.lb-close svg {
  width: 22px; height: 22px;
  stroke: #111111;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.lb-close:hover svg { opacity: 1; }

.lb-prev, .lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px 12px;
  z-index: 1001;
  opacity: 0.6;
  stroke: #111111;
  transition: opacity 0.2s;
}
.lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-prev { left: 6px; }
.lb-next { right: 6px; }
.lb-prev svg, .lb-next svg {
  width: 28px; height: 28px;
  stroke: #111;
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-counter {
  position: fixed;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #111111;
  z-index: 1001;
}

@media (min-width: 768px) {
  .cat-panel { max-width: 600px; padding: 0 40px 80px; }
  .cat-nav   { max-width: 600px; padding: 24px 40px 18px; }
}

.cat-nav {
  position: relative;
}

.cat-menu-btn {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.cat-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111111;
}

.cat-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: rgba(242,242,242,0.97);
  backdrop-filter: blur(8px);
  border: 1px solid #ddd;
  min-width: 160px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: 0.22s;
  z-index: 300;
}

.cat-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.cat-menu a {
  display: block;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
  padding: 10px 18px;
}

.cat-menu a:hover {
  background: #111;
  color: #f2f2f2;
}

@media (max-width: 480px) {

  .cat-nav {
    padding: 12px 10px;
    gap: 6px;
  }

  .cat-arrow svg {
    width: 20px;
    height: 20px;
  }

  .cat-title {
    font-size: 13px;
    letter-spacing: 0.05em;
  }

  .cat-menu-btn {
    right: 25px;
    padding: 4px;
    gap: 4px;
  }

  .cat-menu-btn span {
    width: 16px;
    height: 2px;
  }

  .cat-menu {
    right: 6px;
    min-width: 140px;
  }
}

.ph-grid-multi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}

.ph-grid-single {
  margin-bottom: 6px;
}

.ph-grid-multi img,
.ph-grid-single img {
  width: 100%;
  display: block;
  object-fit: cover;
}

@media (min-width: 1024px) {

  .cat-panel {
    column-count: 4;
    column-gap: 12px;
    padding: 0 80px;
    max-width: 1600px;
    margin: 0 auto;
  }

  .ph-grid-multi,
  .ph-grid-single {
    display: contents;
  }

  .cat-panel img {
    width: 100%;
    margin-bottom: 12px;
    break-inside: avoid;
    display: block;
  }
}

body {
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.page-loaded {
  opacity: 1;
}

body.fade-out {
  opacity: 0;
}

.lb-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1200px;
  width: 90%;
  position: relative; 
}

.lb-image-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}

.lb-caption {
  flex: 1;
  color: #111;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.lb-vertical-name {
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  color: #111111;
  pointer-events: none;
}

@media (max-width: 768px) {
  .lb-content {
    flex-direction: column;
    gap: 20px;
  }

  .lb-caption {
    text-align: center;
  }

  .lb-vertical-name {
    display: none;
  }
}