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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: #020617;
  color: #e5e7eb;
  overflow-x: hidden;
  overflow-anchor: none;
}

/* BG */
canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
}

/* SECTIONS */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

/* CONTAINER */
.container {
  display: flex;
  max-width: 1600px;
  margin: auto;
  padding: 0 80px;
  gap: 80px;
  align-items: center;
}

.section.right .container {
  flex-direction: row-reverse;
}

/* TEXT */
.text {
  width: 45%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(60px);
  transition: 0.8s;
}

.section.show .text {
  opacity: 1;
  transform: translateY(0);
}

/* TITLES */
h1 {
  font-size: 56px;
  margin-bottom: 30px;
  line-height: 1.2;
}

h2 {
  font-size: 28px;
  margin-top: 40px;
  margin-bottom: 15px;
  color: #38bdf8;
}

h3 {
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 5px;
}

/* TEXT */
p {
  font-size: 18px;
  line-height: 2;
  margin-bottom: 15px;
  color: #9ca3af;
  white-space: pre-line;
}

/* BUTTONS */
.lang-buttons {
  margin: 20px 0;
}

.lang-buttons button {
  margin-right: 10px;
  padding: 6px 14px;
  border: none;
  background: #38bdf8;
  color: #020617;
  cursor: pointer;
  border-radius: 4px;
}

.lang-buttons .active {
  background: #0ea5e9;
}

/* IMAGE */
.media {
  width: 55%;
}

.media img {
  width: 100%;
  max-width: 700px;
  display: block;
  margin: auto;
}

/* HERO IMAGE */
.hero-img img {
  max-width: 500px;
}

/* EXPERIENCE */
.experience-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 40px;
}

.experience-title {
  text-align: center;
  margin-bottom: 40px;
}

.experience-grid {
  display: flex;
  gap: 60px;
}

.experience-column {
  width: 50%;
}

/* ========================= */
/* CERTIFICAÇÕES */
/* ========================= */

.cert-wrapper {
  width: 100%;
  text-align: center;
}

.cert-header {
  max-width: 700px;
  margin: 0 auto 40px;
}

.cert-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 30px;
  justify-items: center;
  max-width: 800px;
  margin: 0 auto;
  
}

.cert-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

/* CARD PADRÃO */
.cert-card {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,0.2);
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

/* HOVER */
.cert-item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 0 30px rgba(56,189,248,0.3);
}

/* IMAGEM PADRONIZADA */
.cert-card img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* TEXTO */
.cert-item p {
  margin-top: 10px;
  font-size: 14px;
  max-width: 160px;
}

/* SCANNER EFFECT */
.cert-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 200%;
  background: linear-gradient(
    transparent,
    rgba(56,189,248,0.3),
    transparent
  );
  opacity: 0;
}

.cert-item.scan .cert-card::after {
  animation: scan 1.2s linear;
}

@keyframes scan {
  0% { top: -100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ========================= */
/* MODAL */
/* ========================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.95);
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: #020617;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  text-align: center;
  border: 1px solid rgba(56,189,248,0.3);
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  cursor: pointer;
}

.validated {
  margin-top: 20px;
  color: #22c55e;
}

/* ========================= */
/* LOADER TERMINAL */
/* ========================= */

.loader-content {
  font-family: monospace;
  color: #38bdf8;
  font-size: 15px;
  line-height: 1.6;
}

#terminal::after {
  content: "|";
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 768px){

  .container {
    flex-direction: column;
    padding: 30px 20px;
    gap: 40px;
    text-align: center;
  }

  .text,
  .media {
    width: 100%;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 22px;
  }

  p {
    font-size: 15px;
    line-height: 1.7;
  }

  .media img {
    max-width: 100%;
    height: auto;
  }

  .experience-grid {
    flex-direction: column;
  }

  .experience-column {
    width: 100%;
  }

  /* CERTIFICAÇÕES MOBILE */
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cert-card {
    width: 110px;
    height: 110px;
  }

  .cert-item p {
    font-size: 13px;
  }

}
/* ========================= */
/* CORREÇÃO IMAGENS MOBILE */
/* ========================= */
@media (max-width: 768px){

  .section .container{
    flex-direction: column !important;
    align-items: center;
  }

  .section.right .container{
    flex-direction: column !important;
  }

  .media{
    width: 100% !important;
    display: flex;
    justify-content: center;
  }

  .media img{
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .text{
    width: 100% !important;
    text-align: center;
  }

}
/* ========================= */
/* LOADER MODERNO */
/* ========================= */

#loader {
  position: fixed;
  inset: 0;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

/* SPINNER */
.spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(56,189,248,0.2);
  border-top: 3px solid #38bdf8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* NOME */
.loader-name {
  font-size: 26px;
  letter-spacing: 4px;
  color: #38bdf8;
  position: relative;
  animation: fadeIn 1.2s ease forwards;
}

/* brilho suave */
.loader-name::after {
  content: "Felipe Martins";
  position: absolute;
  left: 0;
  top: 0;
  color: #38bdf8;
  filter: blur(8px);
  opacity: 0.5;
}

/* animação */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* saída */
#loader.hide {
  animation: fadeOut 0.8s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
