/* edbn.dev — overrides sobre o Hugo Profile */

:root {
  --portfolio-rule: rgba(52, 58, 64, 0.16);
  --portfolio-rule-strong: rgba(52, 58, 64, 0.28);
}

body.dark {
  --portfolio-rule: rgba(228, 230, 235, 0.18);
  --portfolio-rule-strong: rgba(228, 230, 235, 0.32);
}

/* O tema só estiliza os filhos diretos do <body>; corrige o fundo do próprio
   <body> para seguir as variáveis de tema (claro/escuro) corretamente. */
body {
  background-color: var(--background-color) !important;
  color: var(--text-color) !important;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 5.5rem;
}

/* Cabeçalho */

#profileHeader {
  border-bottom: 1px solid var(--portfolio-rule);
}

#profileHeader .navbar {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

#profileHeader .navbar-brand {
  font-family: "Alata", sans-serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

#profileHeader .navbar-nav .nav-link {
  font-family: "Alata", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.7rem;
}

#theme-toggle {
  font-size: 20px !important;
}

/* Hero */

.portfolio-hero {
  padding: clamp(3.5rem, 10vh, 7rem) 0 clamp(2.5rem, 7vh, 4.5rem);
  border-bottom: 1px solid var(--portfolio-rule);
}

.portfolio-hero .hero-kicker {
  font-family: "Alata", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
  border-left: 2px solid var(--primary-color);
  padding-left: 0.65rem;
  margin-bottom: 1.25rem;
}

.portfolio-hero h1 {
  font-family: "Alata", sans-serif;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--text-color);
}

.portfolio-hero .hero-role {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-secondary-color);
  max-width: 44rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-portfolio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Alata", sans-serif;
  font-size: 0.88rem;
  line-height: 1;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--primary-color);
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-color) !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-portfolio:hover,
.btn-portfolio:focus {
  background: var(--primary-color);
  color: var(--background-color) !important;
}

.btn-portfolio--small {
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
}

.hero-contact-link {
  font-family: "Alata", sans-serif;
  font-size: 0.88rem;
  color: var(--text-secondary-color) !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.hero-contact-link:hover {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color);
}

/* Seções da home */

.portfolio-section {
  padding: clamp(2.75rem, 7vh, 4.5rem) 0;
  border-bottom: 1px solid var(--portfolio-rule);
}

.portfolio-section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-family: "Alata", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
  margin: 0;
}

@media (min-width: 992px) {
  .section-label {
    position: sticky;
    top: 5.5rem;
  }
}

.section-body {
  font-size: 1.02rem;
  line-height: 1.75;
}

.section-body p {
  margin-bottom: 1.15rem;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.section-body a {
  color: var(--text-link-color) !important;
  text-decoration: none;
  border-bottom: 1px solid var(--portfolio-rule);
}

.section-body a:hover {
  border-bottom-color: var(--primary-color);
}

/* Lista de projetos na home */

.project-list {
  border-top: 1px solid var(--portfolio-rule);
}

.project-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--portfolio-rule);
  text-decoration: none !important;
  color: var(--text-color) !important;
}

.project-index {
  font-family: "Alata", sans-serif;
  font-size: 0.72rem;
  color: var(--text-secondary-color);
  padding-top: 0.25rem;
}

.project-title {
  display: block;
  font-family: "Alata", sans-serif;
  font-size: 1.18rem;
  line-height: 1.3;
  color: var(--text-color);
  transition: color 0.15s ease;
}

.project-desc {
  display: block;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-secondary-color);
  margin-top: 0.15rem;
}

.project-arrow {
  font-family: "Alata", sans-serif;
  font-size: 1rem;
  color: var(--text-secondary-color);
  padding-top: 0.1rem;
  transition: transform 0.15s ease, color 0.15s ease;
}

.project-row:hover .project-title,
.project-row:focus .project-title {
  color: var(--primary-color);
}

.project-row:hover .project-arrow,
.project-row:focus .project-arrow {
  transform: translateX(3px);
  color: var(--primary-color);
}

.section-more {
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-family: "Alata", sans-serif;
  font-size: 0.85rem;
}

.section-more a {
  color: var(--text-secondary-color) !important;
  border-bottom: 0 !important;
  text-decoration: none !important;
}

.section-more a:hover {
  color: var(--primary-color) !important;
}

/* Contato */

.contact-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 2rem;
}

.contact-links li {
  margin: 0;
}

.contact-links a {
  font-family: "Alata", sans-serif;
  font-size: 0.95rem;
  border-bottom: 0 !important;
}

.contact-links a:hover {
  color: var(--primary-color) !important;
}

/* Páginas internas */

.page-shell {
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-eyebrow {
  font-family: "Alata", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-family: "Alata", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--text-color);
}

.page-header .lead {
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--text-secondary-color);
  max-width: 46rem;
  margin: 0;
}

.page-intro {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text-secondary-color);
  max-width: 46rem;
}

.page-intro p:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-block;
  font-family: "Alata", sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary-color) !important;
  text-decoration: none;
  border-bottom: 0 !important;
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--primary-color) !important;
}

.page-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--portfolio-rule);
}

.page-footer .back-link {
  margin-bottom: 0;
}

/* Lista de projetos e privacidade */

.project-entries {
  margin-top: 2rem;
}

.project-entry {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--portfolio-rule);
}

.project-entry:last-child {
  border-bottom: 1px solid var(--portfolio-rule);
}

.project-entry-index {
  font-family: "Alata", sans-serif;
  font-size: 0.72rem;
  color: var(--text-secondary-color);
  padding-top: 0.35rem;
}

.project-entry h2 {
  font-family: "Alata", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.project-entry h2 a {
  color: var(--text-color) !important;
  text-decoration: none;
  border-bottom: 0 !important;
}

.project-entry h2 a:hover {
  color: var(--primary-color) !important;
}

.project-entry-desc {
  color: var(--text-secondary-color);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 0.6rem;
}

.project-entry-link {
  font-family: "Alata", sans-serif;
  font-size: 0.85rem;
  color: var(--text-secondary-color) !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.project-entry-link:hover {
  color: var(--primary-color) !important;
}

/* Conteúdo das páginas internas */

#single {
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
  font-size: 1rem;
  line-height: 1.75;
}

#single .page-content {
  font-size: 1.02rem;
  line-height: 1.75;
}

#single .page-content a {
  color: var(--text-link-color) !important;
  text-decoration: none;
  border-bottom: 1px solid var(--portfolio-rule);
}

#single .page-content a::after {
  display: none !important;
}

#single .page-content a:hover {
  border-bottom-color: var(--primary-color);
}

#single .page-content h1,
#single .page-content h2,
#single .page-content h3,
#single .page-content h4,
#single .page-content h5,
#single .page-content h6 {
  font-family: "Alata", sans-serif;
  color: var(--text-color) !important;
  letter-spacing: -0.01em;
}

#single .page-content h2 {
  font-size: 1.45rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--portfolio-rule);
}

#single .page-content h3 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
}

#single .page-content ul,
#single .page-content ol {
  list-style-position: outside;
  padding-left: 1.25rem;
}

#single .page-content li {
  margin-bottom: 0.35rem;
}

#single .page-content table {
  display: table;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  border-collapse: collapse;
  border-radius: 0;
  padding: 0;
  opacity: 1;
  font-size: 0.92rem;
}

#single .page-content table > thead > tr > th {
  background: var(--secondary-color) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--portfolio-rule);
  font-family: "Alata", sans-serif;
  font-weight: 400;
  text-align: left;
  overflow-wrap: break-word;
}

#single .page-content table > tbody > tr > td {
  background: transparent !important;
  border: 1px solid var(--portfolio-rule);
  overflow-wrap: break-word;
}

@media (max-width: 575.98px) {
  #single .page-content table {
    font-size: 0.85rem;
  }

  #single .page-content table > thead > tr > th,
  #single .page-content table > tbody > tr > td {
    padding: 0.4rem !important;
  }
}

#single .page-content pre {
  background: var(--secondary-color) !important;
  border: 1px solid var(--portfolio-rule);
  border-radius: 0.5rem;
  padding: 1rem;
}

#single .page-content code {
  color: var(--primary-color) !important;
}

#single .page-content blockquote {
  border-left: 3px solid var(--primary-color);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--text-secondary-color);
  font-size: 1rem;
}

/* Índice lateral */

#single aside.toc {
  position: sticky;
  top: 5.5rem;
  max-height: calc(100vh - 7rem);
  overflow: auto;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--portfolio-rule);
  background: transparent;
}

#single aside.toc h5 {
  font-family: "Alata", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary-color);
  margin: 0 0 0.75rem;
}

#single aside.toc .toc-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#single aside.toc .toc-content li {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

#single aside.toc .toc-content a {
  color: var(--text-secondary-color) !important;
  text-decoration: none;
  border-bottom: 0;
}

#single aside.toc .toc-content a:hover {
  color: var(--primary-color) !important;
}

/* Currículo */

.cv-page .cv-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--portfolio-rule);
}

.cv-page .cv-toolbar .back-link {
  margin-bottom: 0;
}

#single .cv-content {
  max-width: 880px;
}

#single .cv-content > h1:first-child {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.25rem;
}

#single .cv-content > h1:first-child + p {
  font-size: 1.15rem;
  color: var(--text-secondary-color);
  margin-bottom: 0.35rem;
}

#single .cv-content > h1:first-child + p + p {
  font-size: 0.9rem;
  color: var(--text-secondary-color);
  line-height: 1.6;
}

#single .cv-content h2:first-of-type {
  margin-top: 1.75rem;
}

#single .cv-content h3 {
  font-size: 1.08rem;
}

/* Rodapé */

.site-footer {
  border-top: 1px solid var(--portfolio-rule);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary-color);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: "Alata", sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary-color) !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-nav a:hover {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color);
}

/* Responsivo */

@media (max-width: 991.98px) {
  .portfolio-hero {
    padding-top: 2.5rem;
  }

  .section-label {
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .project-row {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    gap: 0.6rem;
  }

  .project-entry {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.6rem;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Impressão do currículo */

@media print {
  header,
  footer,
  .cv-toolbar,
  .back-link {
    display: none !important;
  }

  #single {
    padding: 0;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  #single .cv-content {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
