:root {
  --bg: #050505;
  --text: #ffffff;
  --text-muted: #86868b;
  --accent: #ff4500; /* Laranja vibrante inspirado nas referências */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

section {
  scroll-snap-align: start;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
}

/* Nav (Inspirado na ref 1 e 3) */
nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 5%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-20px);
  animation: navFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.1s;
}

@keyframes navFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
}

/* Hero Section (Inspirado na ref 3 e 4) */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh 0 2vh;
  position: relative;
  z-index: 2;
}

.hero-tags {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  font-weight: 500;
  flex-wrap: wrap;
}

.hero-tags span.active {
  color: var(--text);
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 1400px;
  margin: 0;
}

.hero-sub {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: clamp(25px, 5vh, 60px);
}

/* hero-sub img now handled by .profile-ring */

.hero-sub p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 450px;
  line-height: 1.4;
  margin: 0;
}

/* Work Section (Inspirado na ref 2 e 4 - Editorial/Grid) */
.work {
  padding: 100px 0;
  border-top: 1px solid #222;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 60px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 50px 20px;
}

.work-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.work-card-media {
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  margin-bottom: 20px;
}

.work-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.6s ease,
              filter 0.6s ease;
  opacity: 0.8;
  filter: saturate(0.8) brightness(0.9);
  pointer-events: none; /* Prevents right click menu inside card */
  will-change: transform, opacity, filter;
}

.work-card:hover video {
  transform: scale(1.04);
  opacity: 1;
  filter: saturate(1.1) brightness(1);
}

.work-card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.work-card-info h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.work-card-info span {
  font-size: 0.9rem;
  color: var(--text-muted);
  background: #1a1a1a;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Software / Tech Stack */
.software {
  padding: 60px 0 100px;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.software p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-right: 20px;
}

.software img {
  height: 36px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.software img:hover {
  opacity: 1;
}

/* Contact Section (Inspirado na ref 2 - Bloco de cor chamativo) */
.contact {
  padding: 80px 0 120px;
}

.contact-banner {
  background: var(--accent);
  border-radius: 32px;
  padding: 80px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s ease;
  will-change: transform, box-shadow;
}

.contact-banner:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(255, 69, 0, 0.15);
}

.contact-banner h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
}

.contact-banner h2 span {
  display: block;
}

.contact-links {
  display: flex;
  gap: 20px;
}

.contact-links a {
  background: #fff;
  color: var(--accent);
  padding: 20px 40px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-links a.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  
}

.contact-links a:hover {
  transform: scale(1.05);
}

/* Footer */
footer {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #222;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-socials a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 30px;
  transition: color 0.3s;
}

.footer-socials a:hover {
  color: var(--text);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(35px) scale(0.97);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-sub {
    margin-top: 25px;
  }
  .contact-banner {
    padding: 60px 30px;
    border-radius: 24px;
  }
  .contact-links {
    flex-direction: column;
    width: 100%;
  }
  .contact-links a {
    text-align: center;
  }
  footer {
    flex-direction: column;
    gap: 20px;
  }
  .footer-socials a {
    margin: 0 15px;
  }
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 0;
  margin: 0;
}
.video-modal.active {
  opacity: 1;
}
.modal-content {
  position: relative;
  width: 90%;
  max-width: 450px;
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-content video {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  outline: none;
}
.close-modal {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s;
}
.close-modal:hover {
  transform: scale(1.1);
}

/* Word by word animation */
.animated-text .word {
  display: inline-block;
  opacity: 0;
  animation: fadeWord 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 0.06s + 0.1s);
  margin-right: 0.15em; /* Space between words */
}

.animated-text .word.muted {
  color: rgba(255, 255, 255, 0.35); /* Meio apagada */
}

.animated-text .word.highlight {
  color: #ffffff;
}

@keyframes fadeWord {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Software stagger animation */
.software.reveal img {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.software.reveal.active img {
  opacity: 0.6;
  transform: translateY(0);
}
.software.reveal.active img:hover {
  opacity: 1;
  transform: translateY(-3px) scale(1.05);
}
.software.reveal.active img:nth-of-type(1) { transition-delay: 0.1s; }
.software.reveal.active img:nth-of-type(2) { transition-delay: 0.2s; }
.software.reveal.active img:nth-of-type(3) { transition-delay: 0.3s; }

/* Swipe Indicator (Hidden on desktop) */
.swipe-indicator {
  display: none;
}

/* FYP Modal Desktop Defaults */

.fyp-track {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile Specific: TikTok Style */
@media (max-width: 768px) {
  html, body {
    scroll-snap-type: none !important;
  }
  section {
    scroll-snap-align: none !important;
  }
  
  /* Auto-scroll marquee for gallery */
  .work-grid {
    display: flex;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    width: 100% !important;
    gap: 16px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0 20px;
    padding: 0 20px;
  }
  /* Hide scrollbar */
  .work-grid::-webkit-scrollbar {
    display: none;
  }
  .work-card {
    scroll-snap-align: center;
  }
  
  .work-card {
    min-width: 70vw;
  }
  
    100% { transform: translateX(calc(-50% - 10px)); }
  }
  
  .swipe-indicator {
    display: block !important;
    margin-bottom: 15px;
  }
  
  /* Enter gallery button */
  
  
  
  
  /* FYP Modal overrides */
  .fyp-track {
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    padding: 0;
    margin: 0;
    -webkit-overflow-scrolling: touch;
  }
  
  .fyp-item {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    background: #000;
    padding: 0;
    margin: 0;
  }
  
  .fyp-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  #desktopModalContent {
    display: none !important;
  }
  
  .close-modal {
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Re-adding Fix Mobile Hero Hierarchy */
@media (max-width: 768px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 20px;
    min-height: auto;
    justify-content: flex-start;
  }
  .hero-title {
    font-size: 2.1rem;
    line-height: 1.25;
  }
  .hero-sub {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 16px;
  }
  /* hero-sub img mobile now handled by .profile-ring */
  .hero-sub p {
    font-size: 1.05rem;
    line-height: 1.5;
  }
  nav {
    padding: 25px 5%;
  }
  
  /* Fix Marquee overflowing screen width */
  .work {
    overflow-x: hidden;
  }
}

/* Fix visibility of marquee items */
@media (max-width: 768px) {
  .work-grid .reveal, .work-grid .work-card {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* Client Location Tag */
.work-card-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.work-card-info h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  flex: 1;
}

.work-card-info .location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.work-card-info .location svg {
  opacity: 0.7;
}

/* Fix mobile gap issue */
@media (max-width: 768px) {
  .work-grid {
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

.work-card-info {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.work-card-info h3 {
  font-size: 1.1rem !important;
  white-space: normal !important;
}
@media (max-width: 768px) {
  .work-card {
    flex-shrink: 0 !important;
  }
}
@media (max-width: 768px) {
  .work-card {
    min-width: 70vw !important;
    width: 70vw !important;
    display: flex !important;
  }
}

/* FYP TikTok Floating Buttons */
.fyp-floating-actions {
  display: none;
}
@media (max-width: 768px) {
  .fyp-floating-actions {
    display: none; /* Shown via JS when modal is active */
    flex-direction: column;
    gap: 16px;
    position: absolute;
    right: 15px;
    bottom: 80px;
    z-index: 1000;
  }
  .video-modal.active .fyp-floating-actions {
    display: flex;
  }
  .fyp-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .fyp-btn:active {
    transform: scale(0.9);
    background: var(--accent);
  }
  .fyp-btn svg {
    opacity: 0.9;
  }
}

/* FYP Custom Progress Bar */
.fyp-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px; /* Slightly taller for easier clicking */
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 1000;
}
.fyp-progress::after {
  content: '';
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 0;
  right: 0;
  /* invisible hit area to make tapping easier */
}
.fyp-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  pointer-events: none; /* Let clicks pass through to parent container */
}
@media (min-width: 769px) {
  #openMobileGallery {
    display: none !important;
  }
}

/* Desktop Modal Nav */
.desktop-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.desktop-nav-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
}
.prev-btn { left: -76px; }
.next-btn { right: -76px; }

@media (max-width: 768px) {
  .desktop-nav-btn { display: none !important; }
}

/* About Card Modal */
.about-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.about-modal.active {
  opacity: 1;
}

.about-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
  max-width: 700px;
  padding: 40px;
  position: relative;
}

.about-close {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10001;
}
.about-close:hover {
  color: white;
}

.about-photo {
  flex-shrink: 0;
}
.about-photo img {
  width: 260px;
  height: 340px;
  border-radius: 24px;
  aspect-ratio: 3/4;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-info h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0;
  opacity: 0;
  transform: translateY(15px);
  animation: aboutFadeIn 0.5s ease forwards 0.15s;
}
.about-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
  margin: 0;
  opacity: 0;
  transform: translateY(15px);
  animation: aboutFadeIn 0.5s ease forwards 0.25s;
}

.about-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 8px;
}

.about-role {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 16px;

  opacity: 0;
  transform: translateY(15px);
}
.about-role:nth-child(1) { animation: aboutFadeIn 0.5s ease forwards 0.35s; }
.about-role:nth-child(2) { animation: aboutFadeIn 0.5s ease forwards 0.5s; }

.about-role-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
}
.about-role-company {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
}
.about-role-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

@keyframes aboutFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About Card Mobile */
@media (max-width: 768px) {
  .about-card {
    flex-direction: column;
    gap: 24px;
    padding: 30px 24px;
    text-align: center;
    align-items: center;
  }
  .about-photo img {
    width: 150px;
    height: 150px;
    border-radius: 20px;
  }
  .about-info {
    align-items: center;
  }
  .about-role {
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
  }
  .about-close {
    top: 10px;
    right: 10px;
  }
}

/* Profile Ring Pulse */
.profile-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}
.profile-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.1);
}
.pulse-ring {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  z-index: 1;
  animation: pulseGlow 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulseGlow {
  0%, 100% { border-color: rgba(255, 255, 255, 0.04); }
  50% { border-color: rgba(255, 255, 255, 0.22); }
}
@media (max-width: 768px) {
  .profile-ring {
    width: 64px;
    height: 64px;
  }
}

/* Language Switcher */
.lang-switcher {
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.lang-switcher a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s;
}
.lang-switcher a:hover {
  color: var(--text-color);
}
.lang-switcher a.active {
  color: var(--text-color);
  font-weight: 600;
}

.work-card-media {
  position: relative;
}
.work-card:hover 