/* --- Variáveis Globais e Resets --- */
/* Tema Padrão (Escuro) */
:root {
  --background: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: #8a2be2;
  --border-color: #333333;
  --font-main: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
}
/* Tema Alternativo (Claro) */
html.light-theme body {
  --background: #ffffff;
  --text-primary: #1a1a1a;
}

#theme-toggle-button {
  background: none !important;
  border: none;
  box-shadow: none;
  outline: none;
}

#theme-toggle-button svg {
  background: transparent !important;
  filter: none !important;
  stroke: var(--text-primary);
  transition: stroke 0.3s ease;
}

html.light-theme .cta-button-border {
  color: #000000;
}

/* --- Resets Globais --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  font-family: var(--font-main);
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex-grow: 1;
}

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

p, a, h1, h2, h3, h4, li {
  overflow-wrap: break-word;
}
/* --- FIM Variáveis Globais e Resets --- */

/*Padronizando seções*/
.article-content, .extra-content, .project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
/*FIM padronizando seções*/

/* --- Estilos do Cabeçalho (Header) --- */
header {
  padding: 1.5rem 2rem;
  top: 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  z-index: 1000;
  background-color: var(--background);
}

header .container {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 2rem;
}

.logo {
  width: 48px;
}

/* Navegação Principal */
.portfolio-links {
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.portfolio-links ul {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  list-style: none;
}

.portfolio-links a:hover {
  color: var(--accent);
}
/* Fim Navegação Principal */

/* Botão hamburguer – estilo básico */
.menu-hamburguer {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
  display: none; /* desktop some */
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.menu-hamburguer .barra {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Estado “X” */
.menu-hamburguer.is-open .barra:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.menu-hamburguer.is-open .barra:nth-child(2) {
  opacity: 0;
}
.menu-hamburguer.is-open .barra:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Ações e Configurações do Header */
.portfolio-actions,
.portfolio-settings {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.portfolio-actions .font-firacode {
  font-size: 1rem;
  vertical-align: middle;
}

.portfolio-actions svg {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.portfolio-actions a:hover svg {
  color: var(--text-primary);
}

.font-firacode {
  font-family: var(--font-mono);
  font-size: 2.5vh;
}

.lang-switcher {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
}

.lang-switcher:hover {
  color: var(--text-primary);
}
/* Fim Ações e Configurações do Header */
/* --- FIM Estilos do Cabeçalho (Header) --- */

/* --- Estilos das Seções Principais (Main) --- */

/* Seção: Home */
#home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 80px);
  padding: 2rem;
  text-align: center;
  gap: 2rem;
}

.home-content {
  display: flex;
  flex-direction: column;
  font-weight: bold;
}

.home-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
/* Fim Seção: Home */

/* Estilos Gerais para Seções */
#solucoes, #artigos, #sobre, #contato {
  padding: 6.5rem 2rem;
  box-sizing: border-box;
}

#home-page {
  font-size: clamp(2.5rem, 8vw, 5rem);
}
/* Fim Estilos Gerais para Seções */

/* Seção: Soluções (Projetos) – GRID */
.projects-grid {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

/* Card de Projeto */
.project-card {
  background: radial-gradient(circle at top left, rgba(138, 43, 226, 0.2), #0f0f1f 55%);
  border: 1px solid rgba(138, 43, 226, 0.35);
  border-radius: 16px;
  color: #e0e0e0;
  font-family: var(--font-main);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(138, 43, 226, 0.7);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.project-card-header {
  background: linear-gradient(
    90deg,
    rgba(45, 7, 234, 0.4),
    rgba(133, 62, 244, 0.25),
    rgba(220, 117, 255, 0.1)
  );
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(138, 43, 226, 0.4);
}

.project-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.project-card-header .links {
  display: flex;
  gap: 0.75rem;
}

.project-card-header .links a svg {
  color: var(--text-primary);
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-card-header .links a:hover svg {
  opacity: 1;
  transform: translateY(-2px);
}

.project-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

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

.project-features {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.features-content .section-title,
.used-tech .section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.features-list {
  list-style-position: inside;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.features-list li + li {
  margin-top: 0.15rem;
}

.used-tech {
  margin-top: 0.75rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background-color: rgba(42, 42, 78, 0.9);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid rgba(138, 43, 226, 0.4);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover .tech-tag {
  background-color: rgba(138, 43, 226, 0.25);
  box-shadow: 0 4px 10px rgba(138, 43, 226, 0.25);
}
/* Fim Card de Projeto */
/* Fim Seção: Soluções (Projetos) */

/* Seção: Artigos */
.article-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 2rem auto;
}

.article-wrapper {
  padding: 3px;
  border-radius: 8px;
  background: linear-gradient(to bottom right, #8a2be2, #4169e1);
}

.article-content {
  background-color: #ffffff;
  color: #1a1a1a;
  padding: 1.5rem;
  border-radius: 6px;
}

.article-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.article-title a, .article-footer a {
  color: #1a1a1a;
}

.article-content time {
  color: #6c757d;
  font-size: 0.9rem;
}

.article-footer {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* Gradientes para cards de artigos */
.article-wrapper:nth-child(1) {
  background: linear-gradient(to bottom right, #6a11cb, #2575fc);
}
.article-wrapper:nth-child(2) {
  background: linear-gradient(to bottom right, #2af598, #009efd);
}
.article-wrapper:nth-child(3) {
  background: linear-gradient(to bottom right, #ffb347, #ffcc33);
}
/* Fim Seção: Artigos */

/* Seção: Sobre */
.sobre-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}

.about-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.about-me {
  text-align: justify;
  margin-bottom: 24px;
  line-height: 1.6;
}

.cta-cv {
  margin-top: auto;
}

.main-verb {
  font-style: italic;
  color: yellow;
  margin-bottom: 12px;
}

.sobre-wrapper {
  display: grid;
  grid-auto-rows: min-content;
  gap: 24px;
  justify-items: center;
}

/* --- Estilização dos Cards da seção Sobre --- */
.sobre-card-wrapper {
  position: relative;
  border-radius: 16px;
  max-width: 450px;
  width: 100%;
  padding: 1px;
  background: radial-gradient(circle at top left, #8a2be2, #4169e1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sobre-card-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(circle at top left, rgba(138, 43, 226, 0.6), rgba(35, 35, 75, 0.9));

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;

  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;

  opacity: 0.7;
  pointer-events: none;
}

.sobre-card-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.extra-content {
  position: relative;
  z-index: 1;
  background: radial-gradient(circle at top left, #17172a, #0f0f1f);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  height: 100%;
  color: var(--text-primary);
}

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

.extra-title a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.extra-title a::after {
  content: "";
  display: block;
  margin-top: 0.35rem;
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2d07ea, #853ef4, #dc75ff);
  opacity: 0.8;
}

.extra-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.sobre-card-wrapper .cta-button {
  padding-inline: 1.5rem;
  font-size: 0.95rem;
  min-width: auto;
}

.sobre-card-wrapper:hover .cta-button {
  box-shadow: 0 6px 18px rgba(138, 43, 226, 0.5);
  transform: translateY(-1px);
}

/* Ajustes para tema claro – seção Sobre */
html.light-theme .sobre-card-wrapper {
  background: radial-gradient(circle at top left, #d1c4ff, #9fb5ff);
}

html.light-theme .extra-content {
  background: radial-gradient(circle at top left, #ffffff, #f5f5ff);
}

html.light-theme .extra-title a {
  color: #1a1a1a;
}

html.light-theme .extra-title a::after {
  opacity: 1;
}

html.light-theme .extra-content .cta-button {
  color: #ffffff;
}
/* --- Fim Estilização dos Cards --- */
/* Fim Seção: Sobre */

/* Seção: Contato (formulário de captura) */
.contato-container {
  max-width: 720px;
  margin: 2rem auto 0;
}

.contato-text {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 2rem;
}

.contato-form {
  background: radial-gradient(circle at top left, rgba(138,43,226,0.25), #0f0f1f 60%);
  border-radius: 16px;
  border: 1px solid rgba(138,43,226,0.4);
  padding: 2rem;
  box-shadow: 0 18px 35px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-field input,
.form-field textarea {
  background-color: rgba(10,10,20,0.95);
  border: 1px solid rgba(75,75,110,0.9);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(160,160,160,0.7);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #8a2be2;
  box-shadow: 0 0 0 1px rgba(138,43,226,0.6);
  background-color: rgba(15,15,30,1);
}

.contato-submit {
  align-self: center;
}

.contato-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  text-align: center;
}
/* Fim Seção: Contato */

/* --- FIM Estilos das Seções Principais (Main) --- */

/* --- Estilos de Componentes e Utilitários --- */

/* Classes Utilitárias */

#global-feedback {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;             /* menos oval */
  font-size: 0.9rem;
  line-height: 1.4;
  background: rgba(15, 15, 31, 0.96);
  color: var(--text-primary);
  border: 1px solid rgba(138, 43, 226, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
}

#global-feedback.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* Sucesso / aviso */
#global-feedback.feedback-success {
  border-color: #22c55e;
}
#global-feedback.feedback-warning {
  border-color: #f97316;
}

.text-gradient {
  color: #2d07ea;

  background-image: linear-gradient(to right, #2d07ea, #853ef4, #dc75ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;

  font-weight: 600;
  text-shadow: 0 1px 2px rgba(84, 84, 84, 0.1);
}

.hidden {
  display: none !important;
}
/* Fim Classes Utilitárias */

/* Botões (CTA - Call to Action) */
.cta-button, .cta-button-border {
  padding: 1rem 2rem;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  cursor: pointer;
  text-align: center;
  min-width: 140px;
}

.cta-button {
  background: linear-gradient(90deg, #2d07ea 0%, #853ef4 60%, #dc75ff 81%);
  border: none;
}

.cta-button-border {
  border: solid transparent;
  border-image: linear-gradient(90deg, #2d07ea 0%, #853ef4 60%, #dc75ff 81%) 1;
}

.cta-button:hover, .cta-button-border:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 43, 226, 0.4);
  text-decoration: none;
}

.cta-button:focus, .cta-button-border:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cta-container {
  display: flex;
  justify-content: center;
}
/* Fim Botões (CTA) */

/*CARDS PADRÃO*/
.sobre-card-wrapper:hover, .article-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.article-wrapper, .sobre-card-wrapper, .cta-button, .cta-button-border {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* --- FIM Estilos de Componentes e Utilitários --- */

/* --- Estilos do Rodapé (Footer) --- */
#footer {
  background-color: #101010;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.4rem 1.1rem;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
}

#footer .container {
  margin-top: auto;
}

.copyrigth {
  display: flex;
  justify-content: space-between;
  white-space: nowrap;
}
/* --- FIM Estilos do Rodapé (Footer) --- */

/* MEDIA QUERIES (TABLET)*/
@media (max-width: 1024px) {
  /* --- GERAL E HEADER --- */
  #solucoes, #artigos, #sobre, #contato {
    padding: 5rem 1.5rem;
  }

  header .container {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
  }

  /* Menu mobile dropdown */
  .portfolio-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--background);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
  }

  .portfolio-links ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 2rem 1.25rem;
  }

  .portfolio-links a {
    width: 100%;
  }

  .portfolio-links.is-open {
    max-height: 260px;
    opacity: 1;
  }

  .menu-hamburguer {
    display: flex;
    z-index: 9999;
  }

  /* --- SEÇÃO: PROJETOS (GRID) --- */
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 700px;
  }

  /* --- SEÇÃO: ARTIGOS --- */
  .article-container {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .article-wrapper {
    max-width: 450px;
    width: 100%;
  }

  /* --- SEÇÃO: SOBRE --- */
  .sobre-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sobre-wrapper {
    display: flex;
    justify-items: center;
  }

  .sobre-card-wrapper {
    max-width: 50%;
  }

  .cta-cv {
    display: flex;
    justify-content: center;
  }

  /* --- CONTATO --- */
  .form-row {
    grid-template-columns: 1fr;
  }

  .contato-form {
    padding: 1.5rem;
  }

  /* --- RODAPÉ (FOOTER) --- */
  .copyrigth {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    white-space: normal;
  }

  .copyrigth > div.status {
    order: -1;
  }
}
/* FIM MEDIA QUERIES (TABLET)*/

/*MEDIA QUERIES (CELULAR)*/
@media (max-width: 600px) {
  .projects-grid {
    gap: 1.5rem;
  }

  .sobre-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .sobre-card-wrapper {
    max-width: 100%;
  }

  #global-feedback {
    bottom: 3.5rem;
    max-width: 92%;
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }
}
/* FIM MEDIA QUERIES (CELULAR)*/