/* ==========================================================================
   jaja ♡ — design tokens
   ========================================================================== */
:root {
  /* section backgrounds */
  --c-bg-main:    #F7F0E4;
  --c-bg-header:  #FBF6EC;
  --c-bg-posts:   #FFFDF8;
  --c-bg-sobre:   #F1E6D3;
  --c-bg-footer:  #2B2018;

  /* text */
  --c-text:       #3B2B22;
  --c-text-soft:  #7C6B5C;
  --c-cream:      #F7F0E4;
  --c-white:      #FFFDF8;
  --c-footer-text:#EFE6D8;
  --c-footer-soft:#B9AB9A;

  /* illustration palette */
  --c-blob-1:  #ECDFC6;
  --c-blob-2:  #F0C165;
  --c-brown-dark: #3B2B22;
  --c-mug:     #C98A6B;
  --c-pot:     #8B5E3C;
  --c-leaf-1:  #9CBE95;
  --c-leaf-2:  #7FA6C4;
  --c-line:    #C9B99E;
  --c-desk:    #DECAA9;

  /* tag pastels */
  --tag-java-bg: #FCE8B8;      --tag-java-fg: #7A5B12;
  --tag-backend-bg: #D9ECDD;   --tag-backend-fg: #2F6B44;
  --tag-automacao-bg: #D9E6F3; --tag-automacao-fg: #2E5A82;
  --tag-dados-bg: #F3DCE3;     --tag-dados-fg: #8A3A55;
  --tag-ia-bg: #E3DCF3;        --tag-ia-fg: #5B3E8A;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1120px;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg-main);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--c-text); font-weight: 600; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--c-mug);
  outline-offset: 3px;
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-soft);
  letter-spacing: 0.01em;
  margin: 0 0 10px;
}
.eyebrow--pill {
  display: inline-block;
  background: var(--c-bg-sobre);
  color: var(--c-text-soft);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.link-arrow {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-text);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.link-arrow:hover { border-color: currentColor; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-text);
  color: var(--c-cream);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #52402F; transform: translateY(-1px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--c-bg-header);
  border-bottom: 1px solid rgba(59, 43, 34, 0.07);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-text);
}
.logo__heart { color: var(--c-mug); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--c-text-soft);
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--c-text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 72px 0 88px; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  margin-bottom: 18px;
  max-width: 15ch;
}
.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--c-text-soft);
  max-width: 42ch;
  margin-bottom: 26px;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.tag {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
}
.tag--java { background: var(--tag-java-bg); color: var(--tag-java-fg); }
.tag--backend { background: var(--tag-backend-bg); color: var(--tag-backend-fg); }
.tag--automacao { background: var(--tag-automacao-bg); color: var(--tag-automacao-fg); }
.tag--dados { background: var(--tag-dados-bg); color: var(--tag-dados-fg); }
.tag--ia { background: var(--tag-ia-bg); color: var(--tag-ia-fg); }
.tag-list--small .tag { font-size: 0.75rem; padding: 5px 12px; }

.hero__art, .about-teaser__art { width: 100%; }
.illustration { width: 100%; height: auto; }

/* ==========================================================================
   Latest posts
   ========================================================================== */
.latest-posts { padding: 40px 0 90px; }
.latest-posts--full { padding-top: 10px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
}
.section-heading h2 { font-size: 1.9rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.post-card {
  background: var(--c-bg-posts);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(59, 43, 34, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(59, 43, 34, 0.11);
}
.post-card__image-link { display: block; }
.post-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--c-blob-1);
}
.post-card__image--placeholder {
  display: block;
  background: linear-gradient(135deg, var(--c-blob-1), var(--c-bg-sobre));
}
.post-card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.post-card__title { font-size: 1.15rem; margin: 10px 0 8px; line-height: 1.3; }
.post-card__title a:hover { color: var(--c-mug); }
.post-card__desc {
  color: var(--c-text-soft);
  font-size: 0.92rem;
  margin-bottom: 18px;
  flex: 1;
}
.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--c-text-soft);
  border-top: 1px solid rgba(59, 43, 34, 0.08);
  padding-top: 14px;
}
.post-card__read { font-weight: 700; color: var(--c-text); }

.empty-state { color: var(--c-text-soft); padding: 30px 0; }

/* ==========================================================================
   Sobre mim (teaser + full page)
   ========================================================================== */
.about-teaser { background: var(--c-bg-sobre); padding: 84px 0; }
.about-teaser__inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 50px;
  align-items: center;
}
.about-teaser__text h2 { font-size: 2.1rem; margin-bottom: 16px; }
.about-teaser__text p { color: var(--c-text-soft); margin-bottom: 22px; max-width: 44ch; }

.about-page { padding: 70px 0 100px; }
.about-page__inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.about-page__text h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: 18px; }
.about-page__text p { color: var(--c-text-soft); margin-bottom: 16px; max-width: 52ch; }
.about-page__text .btn { margin-top: 10px; }

/* ==========================================================================
   Page header (posts / projetos)
   ========================================================================== */
.page-header { padding: 64px 0 20px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 10px; }
.page-header__desc { color: var(--c-text-soft); max-width: 50ch; }

/* ==========================================================================
   Projetos
   ========================================================================== */
.project-list { padding: 30px 0 100px; }
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--c-bg-posts);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: 0 10px 26px rgba(59, 43, 34, 0.06);
}
.project-card__title { font-size: 1.2rem; margin: 10px 0 8px; }
.project-card__desc { color: var(--c-text-soft); font-size: 0.92rem; margin-bottom: 16px; }
.project-card .tag-list { margin-bottom: 16px; }
.project-list__hint {
  margin-top: 30px;
  font-size: 0.85rem;
  color: var(--c-text-soft);
}
.project-list__hint code {
  background: var(--c-bg-sobre);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ==========================================================================
   Individual post page
   ========================================================================== */
.post-page { padding: 56px 0 100px; }
.post-page__wrap { max-width: 760px; }
.back-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-soft);
  margin-bottom: 26px;
}
.back-link:hover { color: var(--c-text); }
.back-link--bottom { margin-top: 40px; margin-bottom: 0; }
.post-page__category { margin-bottom: 16px; }
.post-page__title { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.2; margin-bottom: 12px; }
.post-page__meta { color: var(--c-text-soft); font-size: 0.88rem; margin-bottom: 30px; }
.post-page__image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 34px;
}
.post-page__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.post-page__content { font-size: 1.05rem; }
.post-page__content h2 { font-size: 1.5rem; margin: 34px 0 14px; }
.post-page__content h3 { font-size: 1.2rem; margin: 26px 0 12px; }
.post-page__content p { margin-bottom: 18px; color: var(--c-text); }
.post-page__content ul, .post-page__content ol { margin: 0 0 18px 22px; }
.post-page__content li { margin-bottom: 8px; }
.post-page__content img { border-radius: var(--radius-md); margin: 22px 0; }
.post-page__content code {
  background: var(--c-bg-sobre);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}
.post-page__content pre {
  background: var(--c-brown-dark);
  color: var(--c-cream);
  padding: 18px 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 22px;
}
.post-page__content pre code { background: none; padding: 0; color: inherit; }
.post-page__content blockquote {
  border-left: 3px solid var(--c-mug);
  padding-left: 18px;
  color: var(--c-text-soft);
  font-style: italic;
  margin: 0 0 18px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--c-bg-footer); color: var(--c-footer-text); padding: 30px 0; }
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}
.site-footer__made { color: var(--c-footer-soft); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero__inner,
  .about-teaser__inner,
  .about-page__inner { grid-template-columns: 1fr; }
  .hero__art { order: -1; max-width: 300px; margin: 0 auto 20px; }
  .about-teaser__art, .about-page__art { max-width: 340px; margin: 0 auto; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-bg-header);
    flex-direction: column;
    padding: 8px 20px 20px;
    gap: 4px;
    display: none;
    border-bottom: 1px solid rgba(59,43,34,0.08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 10px 0; }
  .nav-toggle { display: flex; }

  .hero { padding: 48px 0 60px; }
  .post-grid { grid-template-columns: 1fr; }
  .about-teaser { padding: 60px 0; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
}
