:root {
  --bg-main: #0f0f10;
  --text-main: #f5f5f5;
  --accent: #6c63ff;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.13);
  --glass-border: #ffffff22;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-main);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--accent);
  transition: color 0.3s;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* cabeçalho */
header {
  background: var(--glass);
  color: var(--text-main);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, box-shadow 0.3s;
}

header.scrolled {
  background: var(--glass-strong);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

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

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  border: 2px solid var(--accent);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: var(--text-main);
  font-weight: 500;
  position: relative;
}

nav ul li a:hover,
nav ul li a:focus {
  color: var(--accent);
  outline: none;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--accent);
  bottom: -5px;
  left: 0;
  transition: width 0.3s;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
  width: 100%;
}

/* Menu */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--accent);
  border-radius: 5px;
  padding: 5px 10px;
  color: var(--text-main);
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url('https://www.transparenttextures.com/patterns/black-paper.png');
  color: var(--text-main);
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, #6c63ff44, #000000cc);
  opacity: 0.9;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-text {
  flex: 1;
  padding-right: 40px;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 800;
}

.hero-text h1 span {
  color: var(--accent);
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 600px;
  opacity: 0.9;
  color: #ccc;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image img {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 10px solid var(--glass-strong);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
  animation: float 6s ease-in-out infinite;
  background: var(--glass);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

.cta-button {
  display: inline-block;
  background: var(--glass);
  color: var(--text-main);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  border: 2px solid var(--accent);
  margin-top: 20px;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.cta-button:hover,
.cta-button:focus {
  background: var(--accent);
  color: var(--bg-main);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  outline: none;
}

.social-links {
  display: flex;
  margin-top: 30px;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--glass);
  border-radius: 50%;
  margin-right: 15px;
  color: var(--text-main);
  transition: all 0.3s;
}

.social-links a:hover,
.social-links a:focus {
  background: var(--accent);
  color: var(--bg-main);
  transform: translateY(-3px);
  outline: none;
}

/* Título */
.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 15px;
  font-weight: 800;
}

.section-title h2 span {
  color: var(--accent);
}

.section-title::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: var(--accent);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Sobre */
.page-section {
  padding: 100px 0;
}

.about-content {
  display: flex;
  justify-content: center;
}

.about-text {
  max-width: 800px;
  text-align: center;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.about-text p {
  margin-bottom: 30px;
  color: #ccc;
  font-size: 1.1rem;
  line-height: 1.8;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.skill-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 20px;
  width: 120px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s;
}

.skill-card:hover,
.skill-card:focus {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  outline: none;
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.skill-card h4 {
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Formação e estagios */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 6px;
  background: var(--accent);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  margin-bottom: 40px;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border: 3px solid var(--bg-main);
  border-radius: 50%;
  top: 20px;
  z-index: 1;
}

.timeline-item.left::before {
  right: -10px;
}

.timeline-item.right::before {
  left: -10px;
}

.timeline-content {
  position: relative;
}

.project-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, border-color 0.3s;
}

.project-content {
  color: var(--text-main);
}

.project-card:hover,
.project-card:focus {
  transform: scale(1.03);
  border-color: var(--accent);
  outline: none;
}

/* Seção do Portfólio */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.portfolio-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  height: 250px;
  background: var(--glass);
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  padding: 20px;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item:focus-within .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-img,
.portfolio-item:focus-within .portfolio-img {
  transform: scale(1.1);
}

.portfolio-overlay h3,
.portfolio-overlay p {
  color: var(--text-main);
  margin-bottom: 10px;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.portfolio-overlay a {
  background: var(--bg-main);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transform: translateY(20px);
  transition: transform 0.3s 0.2s;
  text-decoration: none;
}

.portfolio-item:hover .portfolio-overlay h3,
.portfolio-item:hover .portfolio-overlay p,
.portfolio-item:hover .portfolio-overlay a,
.portfolio-item:focus-within .portfolio-overlay h3,
.portfolio-item:focus-within .portfolio-overlay p,
.portfolio-item:focus-within .portfolio-overlay a {
  transform: translateY(0);
}

/* Seção de Contato */
.contact-container {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 40px;
  flex-wrap: wrap;
}

.contact-info {
  flex: 1 1 260px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.10);
  color: var(--text-main);
  min-width: 260px;
  max-width: 380px;
}

.contact-info h3 {
  color: var(--accent);
  margin-bottom: 18px;
}

.contact-info p {
  color: #ccc;
  font-size: 1.1rem;
  line-height: 1.8;
}

.contact-ctas {
  flex: 2 1 320px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  max-width: 360px;
}

.cta-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-main);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, border-color 0.3s;
  backdrop-filter: blur(10px);
}

.cta-card:hover,
.cta-card:focus {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  outline: none;
}

.cta-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 10px;
}

/* Footer */
footer {
  background: #070707;
  color: #777;
  padding: 40px 20px;
  text-align: center;
  font-size: 0.9em;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--accent);
}

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

.footer-social {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.footer-social a img {
  width: 24px;
  height: 24px;
  filter: invert(1);
  transition: filter 0.3s;
}

.footer-social a:hover img,
.footer-social a:focus img {
  filter: invert(0.5) sepia(1) saturate(5) hue-rotate(230deg);
}

.copyright {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* botão para voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: var(--bg-main);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover,
.back-to-top:focus {
  background: #1a1a1a;
  color: var(--accent);
  transform: translateY(-5px);
  font-size: 1.2rem;
  outline: none;
}

/* Responsividade */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    margin-top: 40px;
  }

  .social-links {
    justify-content: center;
  }

  .about-content {
    flex-direction: column;
  }

  .about-text {
    padding-right: 0;
    margin-bottom: 40px;
  }

  .contact-container {
    flex-direction: column;
    gap: 30px;
    align-items: stretch;
  }

  .contact-info,
  .contact-ctas {
    max-width: 100%;
    min-width: 0;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 60px;
    padding-right: 20px;
    text-align: left;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  .timeline-item::before {
    left: 20px;
    right: auto;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    flex-direction: column;
    background: var(--glass-strong);
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    max-width: 300px;
    height: calc(100vh - 80px);
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: left 0.3s ease;
  }

  nav ul.show {
    left: 0;
  }

  nav ul li {
    margin: 20px 0;
  }

  nav ul li a {
    font-size: 1.2rem;
  }

  .skills-grid {
    gap: 15px;
  }

  .skill-card {
    width: 100px;
    padding: 15px;
  }

  .contact-ctas {
    grid-template-columns: 1fr;
  }

  .cta-card {
    padding: 15px;
  }
}