/* Portfolio Specific Styles - High End / Dark / Editorial */

:root {
  /* Enforced Dark Theme specific for Portfolio */
  --p-bg: #050505;
  --p-text: #f0f0f0;
  --p-muted: #888888;
  --p-accent: #333333;
  --p-card-bg: #111111;
  --p-border: rgba(255, 255, 255, 0.1);
  --p-font-display: 'Inter', sans-serif;
  --p-font-display: 'Inter', sans-serif;
  /* Could load a serif if we had one, but Inter weights work well */
  --brand-color: #22c55e;
}

body.portfolio-page {
  background-color: var(--p-bg);
  color: var(--p-text);
  font-family: var(--p-font-display);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}



/* Typography Overrides */
.p-title-huge {
  font-size: clamp(3rem, 7vw, 7rem);
  /* Slightly adjusted for better mobile fit */
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0;
  text-transform: uppercase;
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
  filter: blur(40px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 800;
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: screen;
}

.p-logo-hero {
  width: 120px;
  height: auto;
  margin-bottom: 2rem;
  opacity: 0.9;
  filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.4));
}

.p-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--p-muted);
  font-weight: 400;
  margin-top: 1rem;
  max-width: 400px;
  line-height: 1.5;
}

/* Image Modal */
.p-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.p-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.p-modal-content {
  width: 90%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.p-modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

/* Zoom state: allows scrolling the full image */
.p-modal-content.zoomed {
  display: block;
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
}

.p-modal-content.zoomed img {
  max-width: none;
  max-height: none;
  width: 100%;
  height: auto;
  cursor: zoom-out;
}

.p-modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
}

.p-modal-hint {
  position: absolute;
  bottom: 2rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* Project Visual Cursor */
.project-visual {
  cursor: pointer;
  position: relative;
}

.project-visual::after {
  content: "Visualizar";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-visual:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Layout */
.portfolio-wrapper {
  position: relative;
  width: 100%;
}

.p-section {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2rem;
  box-sizing: border-box;
}

.p-section.intro {
  z-index: 10;
  background: var(--p-bg);
}

/* Stacking Cards logic will be handled via GSAP Pinning, 
   but basic styling ensures they look good statically */
.project-card-section {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--p-bg);
  /* borders for debugging/separation? No, minimal. */
}

.project-card {
  width: 100%;
  max-width: 1400px;
  height: 85vh;
  background: var(--p-card-bg);
  border-radius: 4px;
  /* Minimal radius */
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  border: 1px solid var(--p-border);
}

.project-info {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--p-border);
  z-index: 2;
  background: var(--p-card-bg);
  /* Ensure opacity */
}

.project-meta {
  font-size: 0.875rem;
  color: var(--p-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.project-visual {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transform: scale(1.1);
  /* Prepared for parallax scaling */
  filter: grayscale(20%);
  transition: filter 0.5s ease;
}

.project-card:hover .project-visual img {
  filter: grayscale(0%);
}

.p-btn {
  display: inline-block;
  color: var(--p-text);
  border: 1px solid var(--p-border);
  padding: 1rem 2rem;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  transition: all 0.3s ease;
  width: fit-content;
  margin-top: 2rem;
}

.p-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.p-btn-whatsapp {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.p-btn-whatsapp:hover {
  background: #128C7E !important;
  border-color: #128C7E !important;
  color: #fff !important;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.p-btn-top {
  background: transparent;
  border: none;
  color: var(--p-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s;
  padding: 10px;
}

.p-btn-top:hover {
  color: var(--brand-color);
  transform: translateY(-5px);
}

/* Simple Navigation */
.p-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  z-index: 999;
  mix-blend-mode: difference;
  pointer-events: none;
  /* Let clicks pass through, enable for links */
  box-sizing: border-box;
}

.p-nav a {
  pointer-events: auto;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

/* Footer Section */
.p-footer {
  background: var(--p-bg);
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .project-card {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
    height: 90vh;
    /* Taller on mobile to fit content */
  }

  .project-info {
    padding: 2rem;
    order: 2;
    border-right: none;
    border-top: 1px solid var(--p-border);
    justify-content: center;
  }

  .project-visual {
    order: 1;
  }

  .p-title-huge {
    font-size: 2.5rem !important;
  }

  .project-visual::after {
    opacity: 1;
  }
}

/* Presentation / Recording Mode */
body.presentation-mode::-webkit-scrollbar {
  display: none;
}

body.presentation-mode {
  cursor: none;
  /* Hide real mouse */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Hide Nav and Interaction Hints in Presentation Mode */
body.presentation-mode .p-nav,
body.presentation-mode .scroll-indicator,
body.presentation-mode .p-modal-hint,
body.presentation-mode .p-btn-top {
  display: none !important;
}

/* Ensure Logo and text are fully visible */
body.presentation-mode .p-section.intro {
  opacity: 1 !important;
}