/* ---------------------------------------------------------------
   Página pessoal — folha de estilo
   Paleta: papel frio, tinta verde-escura, pinho e latão como sinais
   Tipografia: Archivo (display, largura expandida) + Source Serif 4 (texto)
   --------------------------------------------------------------- */

:root {
  --paper: #eef1ed;
  --paper-deep: #e2e7e1;
  --ink: #16241f;
  --ink-soft: #4a5a53;
  --pine: #0f5d4a;
  --brass: #a97c20;
  --rule: #c6cec6;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.9375rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.1rem, 1.6rem + 2vw, 2.9rem);
  --step-display: clamp(2.9rem, 1.6rem + 6vw, 5.4rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.62;
  font-optical-sizing: auto;
}

a {
  color: var(--pine);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

/* ------------------------------ estrutura ------------------------------ */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 5rem;
}

.layout {
  display: grid;
  grid-template-columns: 20rem minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.rail {
  position: sticky;
  top: 2.5rem;
}

.main {
  max-width: 62ch;
}

/* --------------------------------- capa -------------------------------- */

.masthead {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.masthead h1 {
  font-family: var(--sans);
  font-size: var(--step-display);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.masthead .role {
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink);
  max-width: 44ch;
}

/* ------------------------------ coluna lateral ------------------------- */

.rail dl {
  margin: 0 0 2rem;
  font-size: var(--step--1);
}

.rail dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-top: 1rem;
}

.rail dd {
  margin: 0.1rem 0 0;
}

.rail nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.rail nav li {
  border-bottom: 1px solid var(--rule);
}

.rail nav a {
  display: block;
  padding: 0.55rem 0;
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}

.rail nav a:hover,
.rail nav a[aria-current="page"] {
  color: var(--pine);
  padding-left: 0.4rem;
}

/* -------------------------------- seções ------------------------------- */

section + section {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

section h2 {
  font-family: var(--sans);
  font-size: var(--step-2);
  font-weight: 650;
  font-stretch: 105%;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 1.4rem;
}

section h3 {
  font-family: var(--sans);
  font-size: var(--step-0);
  font-weight: 640;
  margin: 0 0 0.3rem;
}

p {
  margin: 0 0 1.1rem;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
}

/* competências: lista de definição, sem barras de progresso */

.skills {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.skills > div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.skills dt {
  font-family: var(--sans);
  font-weight: 620;
  font-size: var(--step--1);
  line-height: 1.45;
}

.skills dd {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.skills .level {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brass);
}

/* formação e projetos */

.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entries li {
  padding: 1.2rem 0 1.2rem 1.4rem;
  border-left: 2px solid var(--pine);
  margin-bottom: 1.2rem;
  background: linear-gradient(90deg, var(--paper-deep), rgba(0, 0, 0, 0));
}

.entries .when {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.entries p {
  margin: 0.35rem 0 0;
  font-size: var(--step--1);
}

/* ----------------------------------- FAQ -------------------------------- */

.faq {
  border-top: 1px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.2rem 1rem 0;
  position: relative;
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.35;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 0.9rem;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--pine);
}

.faq details[open] summary::after {
  content: "–";
}

.faq summary:hover {
  color: var(--pine);
}

.faq .answer {
  padding: 0 2.2rem 1.3rem 0;
  font-size: var(--step--1);
}

.faq .answer p {
  margin: 0;
}

/* -------------------------------- contato ------------------------------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--step-0);
}

.contact-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

footer {
  margin-top: 4.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ink);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* ------------------------------ responsivo ------------------------------ */

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

  .rail {
    position: static;
  }

  .skills > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ------------------------- listas de produção --------------------------- */

.prod {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: prod;
}

.prod li {
  counter-increment: prod;
  position: relative;
  padding: 0.9rem 0 0.9rem 2.2rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
}

.prod li::before {
  content: counter(prod);
  position: absolute;
  left: 0;
  top: 0.95rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pine);
}

.prod .meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-soft);
}

/* prêmios em duas colunas compactas */

.awards {
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--step--1);
}

.awards li {
  break-inside: avoid;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}

.awards .year {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--brass);
  margin-right: 0.4rem;
}

@media (max-width: 700px) {
  .awards {
    columns: 1;
  }
}

/* destaque de registro/patente */

.record {
  border: 1px solid var(--pine);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  font-size: var(--step--1);
}

.record h3 {
  margin-bottom: 0.4rem;
}

.record p {
  margin: 0;
}
