/* Leandro Baldan, portfólio. HTML/CSS estático, sem build.
   Identidade: a mesma do README do perfil (preto, vermelho, floresta, onda AC, xadrez). */

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --bg-alt: #101010;
  --surface: #141414;
  --surface-2: #1a1a1a;
  --border: #262626;
  --text: #e6e6e6;
  --text-soft: #a3a3a3;
  --muted: #6e6e6e;
  --red: #b3261e;
  --red-bright: #d6372c;
  --red-soft: #2a0f0d;
  --radius: 10px;
  --maxw: 1080px;
  --mono: 'JetBrains Mono', ui-monospace, 'DejaVu Sans Mono', monospace;
  --gothic: 'UnifrakturMaguntia', 'Old English Text MT', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--red-bright); }
a:hover { color: #ff5a4e; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--red-bright); outline-offset: 3px; border-radius: 4px; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 11, 11, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }

.brand {
  color: var(--text); text-decoration: none; margin-right: auto;
  font-family: var(--gothic); font-size: 1.55rem; line-height: 1;
}
.brand:hover { color: var(--text); }

.nav { display: flex; gap: 20px; }
.nav a { color: var(--text-soft); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nav a:hover { color: var(--red-bright); }

@media (max-width: 860px) { .nav { display: none; } }

/* ---------- hero ---------- */

.hero { position: relative; border-bottom: 1px solid var(--border); }

.hero-art {
  width: 100%; height: clamp(170px, 28vw, 300px);
  background: #0b0b0b url("img/header.svg") center bottom / cover no-repeat;
}

.hero-inner { padding: 8px 20px clamp(40px, 6vw, 64px); max-width: var(--maxw); margin: 0 auto; }

.hero h1 {
  font-family: var(--gothic); font-weight: 400; letter-spacing: 0;
  font-size: clamp(3rem, 9vw, 5.4rem); margin: 0 0 .1em; color: #f0f0f0;
}

.typed {
  font-family: var(--mono); color: var(--text-soft); font-size: clamp(.92rem, 2vw, 1.05rem);
  margin-bottom: 22px;
}
.typed::after {
  content: "▌"; color: var(--red); margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 66ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 36px; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 8px;
  background: var(--red); color: #fff; border: 1px solid var(--red);
}
.btn:hover { background: var(--red-bright); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--muted); }

.hero-facts {
  list-style: none; margin: 0; padding: 22px 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px;
  border-top: 1px solid var(--border);
}
.hero-facts strong { display: block; font-family: var(--mono); font-size: 1.35rem; color: var(--text); }
.hero-facts li:first-child strong { color: var(--red-bright); }
.hero-facts span { color: var(--muted); font-size: .88rem; }

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

.section { padding: clamp(52px, 8vw, 84px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-lead { color: var(--text-soft); max-width: 68ch; }

/* lance de xadrez acima do título */
.move {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .08em;
  color: var(--red-bright); margin-bottom: .7em; display: flex; align-items: center; gap: 10px;
}
.move .piece { font-size: 1.2rem; color: var(--text); letter-spacing: 0; }

/* divisor em onda AC */
.wave {
  height: 18px; max-width: 520px; margin: 0 auto; opacity: .55;
  background: url("img/divider.svg") center / contain no-repeat;
}

/* ---------- sobre ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.about p { color: var(--text-soft); }
.about strong { color: var(--text); }
.spotify { justify-self: center; text-decoration: none; }
.spotify img { border-radius: 8px; }
.spotify-label { font-family: var(--mono); font-size: .75rem; color: var(--muted); text-align: center; margin-top: 8px; }

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

/* ---------- dia a dia ---------- */

.work-grid { display: grid; gap: 22px; margin-top: 36px; }

.work {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
}
.work h3 { font-size: 1.3rem; }
.work .kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.work p, .work li { color: var(--text-soft); font-size: .97rem; }
.work strong { color: var(--text); }
.work ul { margin: 0 0 1em; padding-left: 18px; }
.work li { margin-bottom: 4px; }
.work li::marker { color: var(--red); }

.diagram {
  margin: 18px 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.diagram svg { display: block; min-width: 640px; width: 100%; height: auto; }
.diagram-cap { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin: 0; }

/* classes usadas dentro dos SVGs de diagrama */
.d-box { fill: var(--surface-2); stroke: #3a3a3a; stroke-width: 1.2; }
.d-box-red { fill: var(--red-soft); stroke: var(--red); stroke-width: 1.2; }
.d-zone { fill: none; stroke: #3a3a3a; stroke-dasharray: 5 5; }
.d-title { fill: var(--text); font: 600 13px 'Inter', sans-serif; }
.d-sub { fill: var(--muted); font: 11px var(--mono); }
.d-label { fill: var(--text-soft); font: 11px var(--mono); }
.d-arrow { stroke: #7a7a7a; stroke-width: 1.4; fill: none; }
.d-arrow-red { stroke: var(--red-bright); stroke-width: 1.4; fill: none; }
.d-head { fill: #7a7a7a; }
.d-head-red { fill: var(--red-bright); }

.work-metrics {
  list-style: none; margin: 16px 0 4px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
}
.work-metrics li { border-left: 3px solid var(--red); padding-left: 12px; margin: 0; }
.work-metrics strong { display: block; font-family: var(--mono); font-size: 1.2rem; }
.work-metrics span { color: var(--muted); font-size: .85rem; }

.privacy-note { font-size: .86rem; color: var(--muted); margin-top: 22px; }

/* ---------- cases ---------- */

.case {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px); align-items: center; margin-top: 52px;
}
.case-reverse .case-shot { order: 2; }

.case-shot {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  filter: grayscale(.35); transition: filter .3s ease;
}
.case-shot:hover { filter: none; }
.case-shot img { transition: transform .35s ease; }
.case-shot:hover img { transform: scale(1.02); }

.case-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.case-head h3 { font-size: 1.5rem; margin: 0; }

.tag {
  font-family: var(--mono); font-size: .7rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  background: var(--red-soft); color: #e98a83; border: 1px solid #4a1814;
  padding: 3px 9px; border-radius: 999px;
}

.case-body p { color: var(--text-soft); font-size: .97rem; }
.case-body strong { color: var(--text); }

.metrics { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 12px; }
.metrics li { display: flex; align-items: baseline; gap: 12px; border-left: 3px solid var(--red); padding-left: 12px; }
.metrics strong { font-family: var(--mono); font-size: 1.2rem; color: var(--text); white-space: nowrap; }
.metrics span { color: var(--text-soft); font-size: .88rem; }

.chips { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--mono); font-size: .74rem; color: var(--text-soft);
  border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; background: var(--surface);
}

.case-body .case-nota {
  font-size: .86rem; color: var(--muted);
  border-left: 2px solid var(--border); padding-left: 12px; margin: 0 0 18px;
}

.text-link { font-weight: 600; font-size: .94rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link + .text-link { margin-left: 18px; }

@media (max-width: 820px) {
  .case { grid-template-columns: 1fr; }
  .case-reverse .case-shot { order: 0; }
}

/* ---------- stack e atividade ---------- */

.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 32px;
}
.stack-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stack-card h3 { color: var(--red-bright); font-family: var(--mono); font-size: .9rem; letter-spacing: .04em; margin-bottom: 12px; }
.stack-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.stack-card li { color: var(--text-soft); font-size: .92rem; }

.activity { margin-top: 40px; display: grid; gap: 14px; }
.activity img { width: 100%; border-radius: 8px; }
.activity-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.activity-note { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin: 0; }
@media (max-width: 720px) { .activity-row { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */

.timeline { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 4px; }
.timeline li {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--border);
}
.tl-when { font-family: var(--mono); font-size: .8rem; color: var(--red-bright); padding-top: 4px; }
.tl-what h3 { margin-bottom: 8px; }
.tl-what p { color: var(--text-soft); font-size: .95rem; margin: 0; }
@media (max-width: 720px) { .timeline li { grid-template-columns: 1fr; gap: 8px; } }

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

.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: 32px 0 20px;
}
.contact-card {
  display: grid; gap: 4px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
}
.contact-card:hover { border-color: var(--red); }
.contact-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red-bright); }
.contact-value { color: var(--text); font-weight: 500; font-size: .95rem; word-break: break-word; }
.contact-note { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- rodapé ---------- */

.footer { border-top: 1px solid var(--border); padding: 26px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.footer .star { color: var(--red); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
