/* ===================================================
   DESIGN TOKENS — Hand-Drawn System
   =================================================== */
:root {
  --bg:        #fdfbf7;
  --fg:        #2d2d2d;
  --muted:     #e5e0d8;
  --accent:    #ff4d4d;
  --blue:      #2d5da1;
  --white:     #ffffff;
  --yellow:    #fff9c4;
  --border:    #2d2d2d;

  --font-head: 'Kalam', cursive;
  --font-body: 'Patrick Hand', cursive;

  /* wobbly border-radius presets */
  --r-wobbly:    255px 15px 225px 15px / 15px 225px 15px 255px;
  --r-wobbly-md: 30px 5px 20px 8px / 8px 20px 5px 30px;
  --r-wobbly-sm: 6px 14px 6px 14px / 14px 6px 14px 6px;
  --r-pill:      255px;

  --shadow:    4px 4px 0px 0px #2d2d2d;
  --shadow-lg: 8px 8px 0px 0px #2d2d2d;
  --shadow-sm: 2px 2px 0px 0px #2d2d2d;
}

/* ===================================================
   RESET & BASE
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--fg);
  background-color: var(--bg);
  background-image: radial-gradient(var(--muted) 1px, transparent 1px);
  background-size: 24px 24px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 700; }

/* ===================================================
   UTILITY
   =================================================== */
.container {
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.wiggle {
  display: inline-block;
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-4deg); }
  50%       { transform: rotate(4deg); }
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.6rem 1.4rem;
  border: 3px solid var(--border);
  border-radius: var(--r-wobbly);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s, color 0.1s;
  white-space: nowrap;
  text-decoration: none;
  min-height: 48px;
}

.btn--primary {
  background: var(--white);
  color: var(--fg);
  box-shadow: var(--shadow);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translate(2px, 2px);
}
.btn--primary:active {
  box-shadow: none;
  transform: translate(4px, 4px);
}

.btn--secondary {
  background: var(--muted);
  color: var(--fg);
  box-shadow: var(--shadow);
}
.btn--secondary:hover {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translate(2px, 2px);
}
.btn--secondary:active {
  box-shadow: none;
  transform: translate(4px, 4px);
}

/* ===================================================
   BADGES
   =================================================== */
.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.15rem 0.6rem;
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-sm);
  background: var(--yellow);
  font-family: 'Nunito', sans-serif;
}
.badge--dark {
  background: var(--fg);
  color: var(--white);
}

/* ===================================================
   NAVIGATION
   =================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 0 0 var(--border);
}

.nav__inner {
  max-width: 1000px;
  margin-inline: auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -1px;
}
.nav__dot { color: var(--accent); }

.nav__links {
  list-style: none;
  display: flex;
  gap: 2rem;
}
.nav__links a {
  font-family: var(--font-body);
  font-size: 1.05rem;
  position: relative;
  transition: color 0.1s;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.2s;
}
.nav__links a:hover { color: var(--accent); }
.nav__links a:hover::after { width: 100%; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--fg);
  border-radius: 99px;
  transition: transform 0.2s;
}

.nav__mobile {
  display: none;
  list-style: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.2rem;
  gap: 0.8rem;
  border-top: 1px dashed var(--muted);
}
.nav__mobile a {
  font-size: 1.1rem;
  font-family: var(--font-body);
}
.nav__mobile.open { display: flex; }

.lang-toggle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  background: none;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--fg);
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.lang-toggle:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.lang-toggle--mobile {
  align-self: flex-start;
  margin-top: 0.2rem;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 5rem 0 3rem;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__tag {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-sm);
  font-size: 0.95rem;
  padding: 0.2rem 0.8rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transform: rotate(-1deg);
}

.hero__name {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.2rem;
}
.hero__name--accent { color: var(--accent); }
.hero__name--mark {
  color: var(--blue);
  display: inline-block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hero__desc {
  font-size: 1.15rem;
  max-width: 42ch;
  margin-bottom: 2rem;
  color: var(--fg);
  opacity: 0.85;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__card-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ID CARD */
.id-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.8rem 1.5rem;
  width: 100%;
  max-width: 300px;
  text-align: center;
  transform: rotate(-2deg);
  transition: transform 0.2s;
}
.id-card:hover { transform: rotate(0deg); }

.id-card__tape {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 60px; height: 20px;
  background: rgba(200, 200, 200, 0.55);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 3px;
}

.id-card__avatar {
  width: 80px; height: 80px;
  border: 3px solid var(--border);
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
  background: var(--muted);
  box-shadow: var(--shadow-sm);
}
.id-card__avatar svg { width: 100%; height: 100%; padding: 6px; }
.id-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.id-card__name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.id-card__role {
  font-size: 0.9rem;
  color: var(--blue);
  margin-bottom: 1rem;
  font-weight: 700;
}
.id-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.id-card__footer {
  font-size: 0.8rem;
  color: var(--fg);
  opacity: 0.6;
  border-top: 1px dashed var(--muted);
  padding-top: 0.7rem;
}

.hero__bounce-circle {
  display: none;
  position: absolute;
  bottom: -20px; right: -20px;
  width: 60px; height: 60px;
  border: 3px dashed var(--accent);
  border-radius: 50%;
  animation: spin 8s linear infinite;
}

.hero__arrow {
  display: none;
  position: absolute;
  top: -10px; left: -60px;
  width: 80px; height: 80px;
  transform: rotate(-20deg);
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  opacity: 0.5;
  animation: bounce 2.5s ease-in-out infinite;
}

/* ===================================================
   SECTIONS COMMON
   =================================================== */
.section {
  padding: 5rem 0;
}

.section__label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--blue);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.section__title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  line-height: 1.1;
}

/* ===================================================
   SOBRE
   =================================================== */
.sobre {
  background: var(--white);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.sobre__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.sobre__text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.sobre__text .btn {
  margin-top: 1rem;
}

.sobre__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fact-card {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow);
  padding: 1.2rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.fact-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translate(2px, 2px) rotate(0deg) !important;
}
.fact-card--yellow { background: var(--yellow); }

.fact-card__num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.fact-card__label {
  font-size: 0.85rem;
  margin-top: 0.3rem;
  opacity: 0.8;
}

/* ── Certificados ── */
.certs {
  margin-top: 1.5rem;
}
.certs__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  margin-bottom: 0.6rem;
}
.cert-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--fg);
  margin-bottom: 0.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cert-badge:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.cert-badge__issuer {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.cert-badge__name {
  font-size: 0.9rem;
  flex: 1;
}
.cert-badge__arrow {
  opacity: 0.4;
  font-size: 0.85rem;
}

/* ===================================================
   EXPERIÊNCIA
   =================================================== */
.experiencia {
  background: var(--bg);
}

.exp__list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow);
  padding: 1.8rem;
}

.exp-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.exp-item__role {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.exp-item__company {
  font-size: 0.95rem;
  color: var(--blue);
  font-weight: 700;
}

.exp-item__period {
  font-size: 0.85rem;
  opacity: 0.65;
  white-space: nowrap;
  padding-top: 0.2rem;
}

.exp-item__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.exp-item__bullets li {
  font-size: 0.97rem;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.exp-item__bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ===================================================
   SKILLS
   =================================================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-group {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.skill-group__title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px dashed var(--muted);
  padding-bottom: 0.6rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.2rem 0.7rem;
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-sm);
  background: var(--bg);
  transition: background 0.1s, color 0.1s, transform 0.1s;
}
.skill-pill:hover { transform: rotate(-2deg); }

.skill-pill--accent {
  background: var(--accent);
  color: var(--white);
}
.skill-pill--blue {
  background: var(--blue);
  color: var(--white);
}

/* ===================================================
   PROJETOS
   =================================================== */
.projetos {
  background: var(--white);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.projects__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.project-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow);
  padding: 1.8rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
}

.project-card--featured {
  grid-column: 1;
  background: var(--yellow);
  transform: rotate(-1deg);
}
.project-card--featured:hover {
  transform: rotate(0deg);
}

.project-card__tape {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 50px; height: 18px;
  background: rgba(200,200,200,0.5);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2px;
}

.project-card__tack {
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.project-card__tack--blue { background: var(--blue); }

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.project-card__tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-card__title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.project-card__desc {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.project-card__techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.project-card__cta {
  font-size: 0.95rem;
  padding: 0.4rem 1rem;
}

.github-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.github-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
  border-radius: var(--r-wobbly-sm);
  transition: background 0.15s;
}
.github-links a:hover {
  background: var(--muted);
}
.github-links__name {
  flex: 1;
}
.github-links__badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  flex-shrink: 0;
}
.github-links__badge--accent {
  background: var(--accent);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: background 0.1s, transform 0.1s, box-shadow 0.1s;
}
.icon-btn:hover {
  background: var(--fg);
  color: var(--white);
  transform: translate(2px, 2px);
  box-shadow: none;
}

/* ===================================================
   CONTATO
   =================================================== */
.contato__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: start;
}

.contato__text p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 38ch;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  transition: color 0.15s, transform 0.15s;
}
.contact-link:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.contact-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* FORM */
.contact-form {
  background: var(--white);
  border: 3px solid var(--border);
  border-radius: var(--r-wobbly-md);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  transform: rotate(0.5deg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--r-wobbly-sm);
  padding: 0.6rem 0.9rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(45,45,45,0.4);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 93, 161, 0.15);
}

.form__feedback {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  min-height: 1.2em;
}
.form__feedback.success { color: #2d7a2d; }
.form__feedback.error   { color: var(--accent); }

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--fg);
  color: var(--bg);
  padding: 1.5rem 0;
  border-top: 3px solid var(--border);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.footer__heart { color: var(--accent); }
.footer__year  { opacity: 0.6; }

/* ===================================================
   DOODLE DECORATIONS
   =================================================== */
.doodle {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.doodle--circle {
  width: 120px; height: 120px;
  border: 3px dashed var(--muted);
  border-radius: 50%;
  opacity: 0.6;
  animation: spin 20s linear infinite;
}
.doodle--top-left  { top: 8%;  left: -3%; }
.doodle--top-right { top: 5%;  right: 2%; }
.doodle--bottom-left { bottom: 10%; left: 5%; }

.doodle--star {
  font-size: 2.5rem;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--border);
  opacity: 0.6;
}
.doodle--star::before { content: '✦'; }

.doodle--zigzag {
  width: 60px; height: 60px;
  border: 3px dashed var(--blue);
  border-radius: var(--r-wobbly);
  opacity: 0.5;
  animation: bounce 4s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===================================================
   RESPONSIVE — tablet
   =================================================== */
@media (max-width: 900px) {
  .skills__grid {
    grid-template-columns: 1fr 1fr;
  }
  .projects__grid {
    grid-template-columns: 1fr 1fr;
  }
  .project-card--featured {
    grid-column: 1 / -1;
  }
}

/* ===================================================
   RESPONSIVE — mobile
   =================================================== */
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .lang-toggle:not(.lang-toggle--mobile) { display: none; }

  .hero {
    min-height: auto;
    padding: 3rem 0 2rem;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__actions { justify-content: center; }
  .hero__desc    { margin-inline: auto; }
  .hero__scroll  { position: static; transform: none; margin-top: 1.5rem; }
  .hero__card-wrap { display: none; }
  .doodle { display: none; }

  .sobre__grid {
    grid-template-columns: 1fr;
  }
  .sobre__facts {
    grid-template-columns: 1fr 1fr;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }
  .project-card--featured { grid-column: 1; }

  .contato__grid {
    grid-template-columns: 1fr;
  }
  .contato__text { order: 2; }
  .contact-form  { order: 1; transform: none; }

  .footer__inner { flex-direction: column; text-align: center; }
}

/* desktop deco visible */
@media (min-width: 641px) {
  .hero__bounce-circle { display: block; }
  .hero__arrow         { display: block; }
}
