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

:root {
  --bg: #f5f4f0;
  --ink: #0f0f0d;
  --ink2: #5a5a55;
  --ink3: #9a9a94;
  --accent: #0f0f0d;
  --tag-law: #e8e4ff;
  --tag-law-text: #3730a3;
  --tag-health: #dcfce7;
  --tag-health-text: #166534;
  --tag-rest: #fff3cd;
  --tag-rest-text: #854d0e;
  --border: rgba(15,15,13,0.1);
  --transition: 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
  cursor: none;
}

@media (hover: none) { body { cursor: auto; } }

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 8px; height: 8px;
  background: var(--ink);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-follower {
  width: 32px; height: 32px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.3s, height 0.3s, border-color 0.3s;
  opacity: 0.5;
}

.cursor.hover { width: 16px; height: 16px; }
.cursor-follower.hover { width: 56px; height: 56px; opacity: 0.2; }

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 48px;
  mix-blend-mode: multiply;
  transition: padding var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(245, 244, 240, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  mix-blend-mode: normal;
}

.nav-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav-right {
  display: flex;
  gap: 36px;
}

.nav-right a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink2);
  letter-spacing: 0.01em;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-right a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width var(--transition-fast);
}

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

/* ===== HERO ===== */
#hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 160px 48px 72px;
  position: relative;
}

.hero-label {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--ink3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3.5rem, 9vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 900px;
}

.hero-title em {
  font-style: italic;
  color: var(--ink2);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--ink3);
}

.sep { opacity: 0.4; }

.scroll-hint {
  position: absolute;
  bottom: 64px; right: 48px;
  color: var(--ink3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all var(--transition-fast);
  animation: bob 2.4s ease-in-out infinite;
}

.scroll-hint:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===== SECTION INTRO ===== */
.section-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 64px 48px 48px;
  border-top: 1px solid var(--border);
}

.section-num {
  font-size: 0.7rem;
  color: var(--ink3);
  font-weight: 400;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
}

.section-name {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== TRABALHOS ===== */
#trabalhos { padding-bottom: 80px; }

.projeto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
  align-items: start;
  transition: background var(--transition-fast);
}

.projeto:hover { background: rgba(15,15,13,0.02); }

.projeto.reverse { direction: rtl; }
.projeto.reverse > * { direction: ltr; }

.projeto-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.projeto-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: #e2e0d8;
}

.projeto-img img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.projeto:hover .projeto-img img { transform: scale(1.04); }

.projeto-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,15,13,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.projeto:hover .projeto-img-overlay { opacity: 1; }

.projeto-img-overlay span {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.projeto-info {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.projeto-info.expanded {
  aspect-ratio: auto;
  overflow: visible;
}

.projeto-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.projeto-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--tag-law);
  color: var(--tag-law-text);
  letter-spacing: 0.02em;
}

.projeto-tag.saude {
  background: var(--tag-health);
  color: var(--tag-health-text);
}

.projeto-tag.rest {
  background: var(--tag-rest);
  color: var(--tag-rest-text);
}

.projeto-tag.outro {
  background: rgba(15, 15, 13, 0.06);
  color: var(--ink2);
}

/* ----- Projetos em desenvolvimento ----- */
.projeto-img.dev img {
  filter: blur(16px) saturate(0.85);
  transform: scale(1.1);
}
.projeto:hover .projeto-img.dev img { transform: scale(1.1); }

.dev-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 15, 13, 0.8);
  color: #f5f4f0;
  padding: 9px 20px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.dev-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  animation: devPulse 1.8s ease-in-out infinite;
}

@keyframes devPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.projeto-status {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: #fef3c7;
  color: #92400e;
  letter-spacing: 0.02em;
}

.projeto-year {
  font-size: 0.72rem;
  color: var(--ink3);
}

.projeto-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.projeto-desc {
  font-size: 0.9rem;
  color: var(--ink2);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 10px;
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.projeto-desc.expanded {
  display: block;
  overflow: visible;
  margin-bottom: 28px;
}

.btn-ler-mais {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink3);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 20px;
  transition: color var(--transition-fast);
  align-self: flex-start;
  position: relative;
  z-index: 3;
}

.btn-ler-mais:hover { color: var(--ink); }

.projeto-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.projeto-techs span {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0 48px;
}

/* ===== SOBRE ===== */
#sobre { padding-bottom: 80px; }

.sobre-wrap {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0;
  padding: 0 48px;
}

.sobre-img-area { padding-right: 64px; }

.sobre-img-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #e2e0d8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sobre-img-placeholder img {
  position: absolute;
  inset: 0;
}

.foto-label {
  font-size: 0.75rem;
  color: var(--ink3);
  letter-spacing: 0.04em;
}

.sobre-text-area {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8px;
}

.sobre-big {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.sobre-big em { font-style: italic; color: var(--ink2); }

.sobre-body {
  font-size: 0.9rem;
  color: var(--ink2);
  line-height: 1.8;
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 40px;
}

.sobre-skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.skill-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-col span {
  font-size: 0.8rem;
  color: var(--ink2);
  font-weight: 400;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ===== CONTATO ===== */
#contato { padding-bottom: 100px; }

.contato-wrap { padding: 0 48px; }

.contato-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 56px;
  max-width: 700px;
}

.contato-title em { font-style: italic; color: var(--ink2); }

.contato-links { display: flex; flex-direction: column; gap: 0; }

.contato-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 400;
  color: var(--ink2);
  transition: color var(--transition-fast);
  gap: 16px;
}

.contato-link:last-child { border-bottom: 1px solid var(--border); }

.contato-link svg {
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  opacity: 0.4;
}

.contato-link:hover { color: var(--ink); }
.contato-link:hover svg { transform: translateX(4px); opacity: 1; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer span { font-size: 0.78rem; color: var(--ink3); }

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--ink3);
  transition: color var(--transition-fast);
}

.footer-links a:hover { color: var(--ink); }

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Esconde o cursor customizado em telas de toque / pequenas */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .cursor, .cursor-follower { display: none !important; }
  body { cursor: auto; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #nav { padding: 20px 24px; }
  #nav.scrolled { padding-top: 14px; padding-bottom: 14px; }

  #hero { padding: 112px 24px 56px; min-height: auto; }

  .scroll-hint { right: 24px; bottom: 40px; }

  .section-intro { padding: 48px 24px 36px; }

  .projeto,
  .projeto.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .projeto-img { aspect-ratio: 16/9; }

  /* No mobile o texto fica empilhado: deixa a altura natural (sem aspect-ratio) */
  .projeto-info { padding: 28px 24px 40px; aspect-ratio: auto; overflow: visible; }

  .projeto-title { font-size: 1.8rem; }

  .divider { margin: 0 24px; }

  .sobre-wrap {
    grid-template-columns: 1fr;
    padding: 0 24px;
    gap: 40px;
  }

  .sobre-img-area {
    padding-right: 0;
    max-width: 320px;
  }

  .sobre-img-placeholder { aspect-ratio: 4/3; }

  .contato-wrap { padding: 0 24px; }

  footer { padding: 24px; flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3rem; }
  .nav-right { gap: 20px; }
  .contato-link { font-size: 0.85rem; }
  .sobre-skills { grid-template-columns: 1fr; }
}
