/* ════════════════════════════════════════════════════════════
   ALG — Arthur Lumertz Guimarães · Portfólio técnico
   Sistema visual: creme / tinta / verde único
   ════════════════════════════════════════════════════════════ */

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

:root {
  /* Cor */
  --bg: #f2efea;
  --bg-alt: #eae6e0;
  --card: #ffffff;
  --ink: #111111;
  --gray: #676767;
  --line: #d7d2cc;
  --green: #00c896;
  --green-dk: #00a87d;
  --white: #f2efea;

  /* Tipografia */
  --display: "Fraunces", Georgia, serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;

  /* Ritmo */
  --pad-x: 60px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--green-dk);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--green);
  color: var(--ink);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
  border: 3px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray);
}

/* ─── Scroll reveal ─────────────────────────────────────────
   Declarado antes dos componentes: assim o transform de :hover
   dos cards vence a regra .rv.in por ordem de cascata. */
.rv {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
.rv.in {
  opacity: 1;
  transform: none;
}

/* ─── Tipografia base ───────────────────────────────── */
h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.06;
}

h1 em,
h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--green);
  position: relative;
}

/* Assinatura ALG: a barra verde do logo, repetida sob a palavra-chave */
h1 em::after,
h2 em::after {
  content: "";
  position: absolute;
  left: 0.04em;
  right: 0.04em;
  bottom: -0.04em;
  height: 3.4px;
  border-radius: 1.7px;
  background: var(--green);
  opacity: 0.3;
}

h3 {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

/* ─── Eyebrow ───────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green-dk);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
}

/* alinha o traço com a primeira linha, mesmo quando o texto quebra */
.eyebrow::before {
  content: "";
  width: 22px;
  height: 3.4px;
  margin-top: 8px;
  border-radius: 1.7px;
  background: var(--green);
  flex-shrink: 0;
}

/* ─── Botões ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  padding: 15px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-solid {
  background: var(--ink);
  color: var(--bg);
}
.btn-solid:hover {
  background: var(--green);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-line:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ─── Cards ─────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 30px;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(17, 17, 17, 0.07);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 200, 150, 0.09);
  border: 1px solid rgba(0, 200, 150, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.card-icon svg {
  width: 19px;
  height: 19px;
  stroke: var(--green-dk);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Badges ────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-live {
  background: rgba(0, 200, 150, 0.12);
  border-color: rgba(0, 200, 150, 0.3);
  color: var(--green-dk);
}
.badge-done {
  background: var(--ink);
  color: var(--bg);
}
.badge-off {
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--gray);
}

/* ─── Chips ─────────────────────────────────────────── */
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--gray);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ─── NAV ───────────────────────────────────────────── */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  background: rgba(242, 239, 234, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition:
    padding 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

nav.scrolled {
  padding: 11px var(--pad-x);
  border-bottom-color: var(--line);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.nav-brand svg {
  width: 62px;
  height: auto;
}

.nav-brand span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.nav-links {
  display: flex;
  gap: 34px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 4px 0;
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 3.4px;
  border-radius: 1.7px;
  background: var(--green);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}
.nav-links a.active {
  color: var(--ink);
}

/* ─── HERO ──────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 150px var(--pad-x) 90px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 258px;
  gap: 76px;
  align-items: center;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.025em;
  margin-bottom: 26px;
}

.hero-name em {
  display: block;
  width: fit-content;
}

.hero-sub {
  font-size: 17px;
  color: var(--gray);
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero-sub strong {
  color: var(--ink);
}

.hero-inner .chips {
  margin-bottom: 38px;
}

.hero-cta {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
}

.hero-photo {
  position: relative;
}

.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  filter: grayscale(100%) contrast(1.04);
}

/* barra verde do logo, ecoada sob a foto */
.hero-photo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -13px;
  width: 62px;
  height: 3.4px;
  border-radius: 1.7px;
  background: var(--green);
}

/* Entrada da página */
.up {
  opacity: 0;
  transform: translateY(18px);
  animation: up 0.75s var(--ease) forwards;
}
@keyframes up {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Seções ────────────────────────────────────────── */
.section {
  padding: 118px var(--pad-x);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(31px, 3.8vw, 48px);
  letter-spacing: -0.02em;
  margin-bottom: 54px;
}

/* ─── SOBRE ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 66px;
  align-items: start;
}

.about-text p {
  color: var(--gray);
  font-size: 16px;
  margin-bottom: 20px;
}
.about-text p:last-child {
  margin-bottom: 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 22px;
}

.stat-num {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  line-height: 1.6;
}

/* ─── STACK ─────────────────────────────────────────── */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.skill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.skill:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.06);
}

.skill-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 13px;
}

.skill-rail {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  border-radius: 2px;
  transition: width 1.1s var(--ease);
}

.skill-level {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 10px;
}

/* ─── PROJETOS ──────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project h3 {
  font-size: 21px;
}

.project-desc {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.75;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: auto;
  padding-top: 6px;
  transition: color 0.2s;
}

.project-link svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  transition: transform 0.25s var(--ease);
}

.project-link:hover {
  color: var(--green-dk);
}
.project-link:hover svg {
  transform: translate(2px, -2px);
}

/* Destaque: texto + painel de dado */
.project.featured {
  grid-column: span 2;
  flex-direction: row;
  gap: 40px;
  align-items: stretch;
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project.featured h3 {
  font-size: 23px;
}

.data-panel {
  flex-shrink: 0;
  width: 244px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.data-num {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 12px;
}

.data-num small {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.data-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 239, 234, 0.55);
  line-height: 1.7;
}

/* ─── FORMAÇÃO ──────────────────────────────────────── */
.edu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.edu-item {
  display: flex;
  flex-direction: column;
}

.edu-year {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-dk);
  margin-bottom: 11px;
}

.edu-item h3 {
  font-size: 19px;
  margin-bottom: 7px;
}

.edu-inst {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.7;
}

.edu-disc {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--gray);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.85;
}

/* ─── CONTATO — única seção escura ──────────────────── */
.dark-section {
  background: var(--ink);
  color: var(--bg);
  padding: 118px var(--pad-x);
}

.dark-section h2 {
  color: #f2efea;
  font-size: clamp(31px, 3.8vw, 48px);
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.dark-section .eyebrow {
  color: var(--green);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 66px;
  align-items: start;
}

.contact-lead {
  font-size: 16px;
  color: rgba(242, 239, 234, 0.62);
  max-width: 44ch;
  margin-bottom: 34px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: rgba(242, 239, 234, 0.14);
  border: 1px solid rgba(242, 239, 234, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.contact-item {
  background: var(--ink);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  transition: background 0.25s var(--ease);
}

.contact-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--green);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.contact-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(242, 239, 234, 0.5);
}

.contact-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--bg);
  overflow-wrap: anywhere;
}

.contact-item:hover {
  background: #1b1b1b;
}

/* ─── FOOTER ────────────────────────────────────────── */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(242, 239, 234, 0.12);
  padding: 30px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

footer svg {
  width: 52px;
  height: auto;
}

footer span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242, 239, 234, 0.45);
}

/* ─── Responsivo ────────────────────────────────────── */
@media (max-width: 980px) {
  :root {
    --pad-x: 26px;
  }

  #hero {
    padding-top: 130px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero-photo {
    order: -1;
    max-width: 188px;
  }

  .section,
  .dark-section {
    padding-block: 82px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .skills {
    grid-template-columns: 1fr 1fr;
  }
  .projects,
  .edu {
    grid-template-columns: 1fr;
  }
  .project.featured {
    grid-column: span 1;
    flex-direction: column;
    gap: 20px;
  }
  .data-panel {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .nav-links {
    display: none;
  }
  .nav-brand span {
    display: none;
  }
  .skills {
    grid-template-columns: 1fr;
  }
  .project-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@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;
  }
  .rv,
  .up {
    opacity: 1 !important;
    transform: none !important;
  }
}
