/* ============================================================
   João Vitor Siqueira Motta — Portfólio
   Tema: Deep Ocean / Offshore Survey
   ============================================================ */

:root {
  --bg-deep: #030d16;
  --bg-panel: rgba(9, 30, 44, 0.55);
  --border-soft: rgba(255, 255, 255, 0.08);
  --accent: #00d1ff;
  --accent-2: #0a84ff;
  --accent-warm: #ffb020;
  --text-main: #eaf6ff;
  --text-muted: #9fb8c8;
  --radius: 18px;
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --max-width: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 13, 22, 0.75) 0%,
    rgba(3, 13, 22, 0.15) 20%,
    rgba(3, 13, 22, 0.15) 80%,
    rgba(3, 13, 22, 0.9) 100%
  );
  z-index: 1;
  pointer-events: none;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

main,
.navbar,
.footer {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.highlight {
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 32px;
  max-width: 780px;
}

/* ---------------- Scroll progress bar ---------------- */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 50;
}

/* ---------------- Navbar ---------------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 6%;
  background: rgba(3, 13, 22, 0.35);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.logo span {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------------- Hero ---------------- */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 140px 8% 80px;
  gap: 40px;
}

.hero-content {
  max-width: 720px;
}

.hero-content .eyebrow {
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.hero h2 {
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.hero-text {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 620px;
  margin-bottom: 26px;
}

.hero-text strong {
  color: var(--text-main);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.badge {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #021019;
  box-shadow: 0 10px 30px rgba(0, 209, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 209, 255, 0.35);
}

.btn-outline {
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 8%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.mouse {
  width: 22px;
  height: 36px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.wheel {
  width: 3px;
  height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.6s infinite ease-in-out;
}

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

/* ---------------- Sections ---------------- */

.section {
  padding: 120px 8%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}

.section-grid p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.section-grid strong {
  color: var(--text-main);
}

.glass-card {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.info-card ul li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}

.info-card ul li:last-child {
  border-bottom: none;
}

.info-card span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* Skills grid */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.cards-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.skill-card,
.cert-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover,
.cert-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.icon-badge {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.skill-card h3,
.cert-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.skill-card p,
.cert-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Timeline / Formação */

.timeline-card {
  border-left: 3px solid var(--accent);
}

.timeline-head h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.timeline-head p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 209, 255, 0.08);
  border: 1px solid rgba(0, 209, 255, 0.25);
  color: var(--text-main);
}

/* Contato */

.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

a.contact-item:hover {
  background: rgba(0, 209, 255, 0.08);
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
}

/* Footer */

.footer {
  text-align: center;
  padding: 36px 8% 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-soft);
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 74px;
    right: 0;
    left: 0;
    background: rgba(3, 13, 22, 0.96);
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 24px;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-bottom: 1px solid var(--border-soft);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding-top: 120px;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 90px 6%;
  }

  .glass-card {
    padding: 22px;
  }
}

/* ============================================================
   PROJETOS + MODAL DE VISUALIZAÇÃO
   ============================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.project-thumb {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #062b45 0%, #0a4a6b 45%, #0f7ea8 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 13, 22, 0) 45%, rgba(3, 13, 22, 0.75) 100%);
  pointer-events: none;
}

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

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

.project-flag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 209, 255, 0.15);
  border: 1px solid rgba(0, 209, 255, 0.45);
  color: var(--accent);
  backdrop-filter: blur(8px);
}

.project-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-body h3 {
  font-size: 1.2rem;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.btn-sm {
  padding: 11px 22px;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-outline.btn-sm {
  border: 1px solid var(--border-soft);
}

/* ---------------- Modal ---------------- */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}

.project-modal.open {
  display: flex;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 9, 16, 0.82);
  backdrop-filter: blur(6px);
}

.project-modal-panel {
  position: relative;
  z-index: 2;
  width: min(1200px, 100%);
  height: min(820px, 92vh);
  display: flex;
  flex-direction: column;
  background: #061a28;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.project-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(9, 30, 44, 0.9);
}

.project-modal-head h3 {
  font-size: 1rem;
  font-weight: 600;
}

.project-modal-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.modal-link {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.modal-link:hover {
  text-decoration: underline;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--accent);
}

.project-modal-body {
  position: relative;
  flex: 1;
  background: #ffffff;
}

.project-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.project-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #061a28;
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
}

.project-loader.hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .project-modal {
    padding: 0;
  }

  .project-modal-panel {
    height: 100vh;
    width: 100%;
    border-radius: 0;
    border: none;
  }

  .project-thumb {
    height: 180px;
  }
}
