/* ==========================================================================
   Vitor Euzebio · Portfolio
   Tema escuro pixel-art: Pixelify Sans / Silkscreen nos títulos,
   IBM Plex Sans / Mono no texto.
   ========================================================================== */

:root {
  --bg: #111418;
  --bg-header: rgba(17, 20, 24, 0.92);
  --surface: #161b21;
  --surface-hover: #18202b;
  --surface-2: #1a2029;
  --surface-3: #1f2733;
  --chip: #181d24;

  --border: #1f252d;
  --border-2: #2a323d;

  --text: #e4e8ee;
  --heading: #f2f5f9;
  --body: #c4cbd5;
  --muted: #aab3c0;
  --muted-2: #8a94a3;
  --muted-3: #7c8694;
  --dim: #5d6775;
  --chip-text: #d4dae2;

  --accent: #2f6fd6;
  --accent-2: #3b7deb;
  --accent-deep: #1c3f7a;
  --link: #7fb4ff;
  --link-hover: #b5d3ff;
  --badge-bg: #16305a;
  --rail: #2a3c5a;
  --dots: #262d37;

  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-pixel: 'Silkscreen', monospace;
  --font-display: 'Pixelify Sans', monospace;

  --content: 920px;
  --gutter: 24px;
}

/* --- Base ---------------------------------------------------------------- */

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 8px 8px;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: #fff; }

img { display: block; }

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-header);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--border);
}

.nav {
  max-width: var(--content);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand__mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 13px;
  box-shadow: 2px 2px 0 #0b1a33;
}

.brand__name {
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--text); }

/* --- Hero: mapa + sobre --------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(var(--dots) 1.5px, transparent 1.6px);
  background-size: 24px 24px;
  background-position: 12px 12px;
}

.hero__map-wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px var(--gutter) 0;
}

.map {
  position: relative;
  width: 100%;
  aspect-ratio: 180 / 71;
}

.map__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Caxias do Sul no mapa */
.map__pin {
  position: absolute;
  left: 35.78%;
  top: 79.7%;
  width: 0;
  height: 0;
}

.map__dot {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent), 0 0 18px 4px rgba(127, 180, 255, 0.55);
}

.map__pulse {
  position: absolute;
  left: -6px;
  top: -6px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--link);
  pointer-events: none;
  animation: pixel-pulse 1.6s steps(5) infinite;
}

@keyframes pixel-pulse {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(3.2); opacity: 0; }
}

.map__line {
  position: absolute;
  left: 10px;
  top: -1px;
  width: 28px;
  height: 2px;
  background: var(--link);
}

.map__label {
  position: absolute;
  left: 38px;
  top: -14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  background: var(--bg);
  border: 2px solid var(--accent);
  white-space: nowrap;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text);
}

.about {
  position: relative;
  max-width: var(--content);
  margin: 0 auto;
  padding: 32px var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  scroll-margin-top: 80px;
}

/* Foto à esquerda, "Sobre mim" + stack à direita, alinhados pelo topo */
.about__row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Moldura com cantos em degrau (pixel) */
.photo {
  width: 280px;
  max-width: 100%;
  flex: none;
  aspect-ratio: 3 / 4;
  padding: 6px;
  background: var(--surface-2);
  clip-path: polygon(
    0 12px, 6px 12px, 6px 6px, 12px 6px, 12px 0,
    calc(100% - 12px) 0, calc(100% - 12px) 6px, calc(100% - 6px) 6px, calc(100% - 6px) 12px, 100% 12px,
    100% calc(100% - 12px), calc(100% - 6px) calc(100% - 12px), calc(100% - 6px) calc(100% - 6px), calc(100% - 12px) calc(100% - 6px), calc(100% - 12px) 100%,
    12px 100%, 12px calc(100% - 6px), 6px calc(100% - 6px), 6px calc(100% - 12px), 0 calc(100% - 12px)
  );
}

/* Lado a lado: a foto acompanha a altura do "Sobre mim" + stack */
@media (min-width: 680px) {
  .about__row { flex-wrap: nowrap; align-items: stretch; }
  .photo { aspect-ratio: auto; min-height: 373px; }
}

.photo__inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.08);
}

.photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 60px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--heading);
  text-shadow: 4px 4px 0 var(--accent-deep);
}

.intro__role {
  margin: 0;
  font-size: 18px;
  color: var(--body);
}

.intro__meta {
  margin: 0;
  font-size: 14px;
  color: var(--muted-2);
  font-family: var(--font-mono);
}

.about__body {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Títulos de seção ----------------------------------------------------- */

.section-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-pixel);
  font-weight: 400;
  font-size: 20px;
  color: var(--heading);
}

.section-title__mark {
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--accent);
}

/* --- Listas com marcador quadrado ---------------------------------------- */

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.bullets li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}

.bullets strong { color: var(--heading); font-weight: 600; }

.bullets__dot {
  width: 6px;
  height: 6px;
  background: var(--accent-2);
}

.bullets--lg { gap: 12px; max-width: 740px; }
.bullets--lg li { gap: 12px; font-size: 17px; }
.bullets--lg .bullets__dot { margin-top: 11px; }

.bullets--sm { gap: 8px; max-width: 720px; }
.bullets--sm li { gap: 10px; font-size: 15px; }
.bullets--sm .bullets__dot { margin-top: 9px; }

/* --- Stack ---------------------------------------------------------------- */

.stack {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack li {
  padding: 4px 10px;
  background: var(--chip);
  border: 1px solid var(--border-2);
  font-size: 13px;
  color: var(--chip-text);
  font-family: var(--font-mono);
}

/* --- Seções principais --------------------------------------------------- */

.main {
  max-width: var(--content);
  margin: 0 auto;
  padding: 56px var(--gutter) 0;
}

.section {
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 80px;
}

/* --- Contato -------------------------------------------------------------- */

.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.contact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 15px;
}

.contact:hover {
  border-color: var(--accent-2);
  color: #fff;
  background: var(--surface-hover);
}

.contact__icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  box-shadow: inset -3px -3px 0 #151b23;
  color: var(--link-hover);
}

.contact__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact__label {
  flex: 1;
  white-space: nowrap;
}

.contact__arrow {
  color: var(--dim);
  font-size: 14px;
}

/* --- Projetos ------------------------------------------------------------- */

.soon {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--surface);
  border: 2px dashed var(--border-2);
}

.soon__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--muted);
}

.soon__cursor {
  width: 10px;
  height: 16px;
  background: var(--accent-2);
  animation: pixel-blink 1s steps(1) infinite;
}

@keyframes pixel-blink {
  50% { opacity: 0; }
}

/* Cards de projeto (para quando houver projetos publicados) */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--border);
}

.project__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.08);
}

.project__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 2px solid var(--border);
}

.project__num {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--link);
}

.project__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.project__link { font-size: 14px; }

/* --- Experiência ---------------------------------------------------------- */

.section--xp {
  padding-bottom: 72px;
  gap: 32px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-left: 40px;
}

.timeline__line {
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background-image: repeating-linear-gradient(to bottom, var(--rail) 0 8px, transparent 8px 14px);
}

.job {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job__node {
  position: absolute;
  left: -40px;
  top: 4px;
  width: 22px;
  height: 22px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 4px var(--rail), 0 0 0 4px var(--bg);
}

.job__node--current {
  background: var(--accent-2);
  box-shadow: inset -4px -4px 0 var(--accent-deep), 0 0 0 4px var(--bg);
}

.job__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-pixel);
  font-size: 12px;
}

.job__period { color: var(--link); }
.job__sep { color: var(--dim); }
.job__duration { color: var(--muted-2); }

.job__badge {
  padding: 2px 8px;
  background: var(--badge-bg);
  color: var(--link-hover);
}

.job__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job__role {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
}

.job__company {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

.job__note {
  margin: 0;
  font-size: 13px;
  color: var(--muted-3);
}

.job__bullets { margin-top: 4px; }

.btn-toggle {
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 12px;
  background: transparent;
  border: 2px solid var(--border-2);
  color: var(--muted);
  font-family: var(--font-pixel);
  font-size: 11px;
  cursor: pointer;
}

.btn-toggle:hover {
  border-color: var(--accent-2);
  color: var(--text);
}

/* --- Rodapé --------------------------------------------------------------- */

.site-footer { border-top: 2px solid var(--border); }

.site-footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--dim);
}

.site-footer__inner a { color: var(--muted-3); }
.site-footer__inner a:hover { color: var(--link-hover); }

/* --- Movimento reduzido --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .map__pulse { animation: none; opacity: 0; }
  .soon__cursor { animation: none; }
}
