/* =========================================================
   PORTFÓLIO — Dark Mode Elegante
   Tipografia editorial · cor pontual · espaço respirável
   ========================================================= */

:root {
  --bg: #0b0b0d;
  --bg-2: #111114;
  --surface: #16161a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #ececec;
  --text-dim: #8a8a93;
  --text-mute: #5a5a62;
  --accent: #d4ff3a;     /* verde-limão elétrico */
  --accent-warm: #f5e6c4;/* creme suave */
  --radius: 14px;
  --max: 1280px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: none; border: 0; background: none; color: inherit; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #000; }

/* ---------- GRÃO ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- CURSOR ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.08s linear;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: var(--accent);
}
@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
  body, a, button { cursor: auto; }
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(11, 11, 13, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 14px 40px;
}
.nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
}
.nav__logo-mark {
  color: var(--accent);
  display: inline-block;
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nav__links {
  display: flex; gap: 36px;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.nav__links a {
  position: relative;
  color: var(--text-dim);
  transition: color 0.3s;
}
.nav__links a::before {
  content: attr(data-num);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-mute);
  position: absolute;
  top: -10px; left: -2px;
  transition: color 0.3s;
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::before { color: var(--accent); }

.nav__menu {
  display: none;
  flex-direction: column; gap: 5px;
  width: 28px; height: 22px;
  align-items: flex-end; justify-content: center;
}
.nav__menu span {
  display: block; height: 1.5px;
  background: var(--text);
  width: 100%;
}
.nav__menu span:last-child { width: 60%; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 40px 60px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between;
  z-index: 2;
}
.hero__meta {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 255, 58, 0.15);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(212, 255, 58, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(212, 255, 58, 0); }
}

.hero__title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 8.5vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 60px 0;
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title .line > * { display: inline-block; }
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-warm);
}
.hero__title .accent {
  position: relative;
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.hero__title .accent::after {
  content: '';
  position: absolute; left: 0; bottom: 8%;
  width: 100%; height: 6px;
  background: var(--accent);
  opacity: 0.18;
  transform: skewX(-12deg);
}

.hero__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: end;
}
.hero__intro {
  max-width: 460px;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
}
.hero__intro strong { color: var(--text); font-weight: 500; }
.hero__actions { display: flex; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  transition: all 0.3s var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #e8ff5c;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 255, 58, 0.25);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--text);
}

.hero__scroll {
  position: absolute;
  bottom: 40px; right: 40px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.line-v {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-mute), transparent);
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- SEÇÕES ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 40px;
  position: relative;
  z-index: 2;
}
.section__head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 80px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.section__title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em;
}

/* ---------- SOBRE ---------- */
.sobre__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
.sobre__text .lead {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.4;
  font-weight: 300;
  margin-bottom: 28px;
}
.sobre__text .lead strong { font-weight: 500; font-style: italic; color: var(--accent-warm); }
.sobre__text p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}
.sobre__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.sobre__card-row {
  display: flex; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.sobre__card-row:last-child { border-bottom: none; }
.sobre__card-row span:first-child {
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sobre__card-row .status {
  color: var(--accent);
  position: relative;
  padding-left: 14px;
}
.sobre__card-row .status::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  animation: pulse 2s ease-in-out infinite;
}

/* ---------- PROJETOS (estado vazio) ---------- */
.projetos__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 560px;
  padding: 56px;
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}
.projetos__empty-mark {
  color: var(--accent);
  font-size: 20px;
}
.projetos__empty h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
}
.projetos__empty p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- PROJETOS ---------- */
.projetos__intro {
  max-width: 680px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
}
.projetos__intro a {
  color: var(--accent-warm);
  border-bottom: 1px solid var(--line-2);
  transition: color 0.3s, border-color 0.3s;
}
.projetos__intro a:hover { color: var(--accent); border-color: var(--accent); }
.projetos .timeline__group-title:first-of-type { margin-top: 48px; }
.projetos__list { display: flex; flex-direction: column; }
.projetos__list + .timeline__group-title { margin-top: 8px; }
.projeto {
  display: grid;
  grid-template-columns: 60px 1fr 100px 40px;
  align-items: center;
  gap: 30px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  cursor: none;
  transition: padding 0.4s var(--ease);
  position: relative;
}
.projeto:last-child { border-bottom: 1px solid var(--line); }
.projeto::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 255, 58, 0.03), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.projeto:hover { padding: 36px 24px; }
.projeto:hover::before { opacity: 1; }
.projeto__index {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
}
.projeto__info h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  transition: color 0.3s, transform 0.4s var(--ease);
}
.projeto:hover .projeto__info h3 {
  color: var(--accent-warm);
  transform: translateX(8px);
}
.projeto__info p {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 520px;
  margin-bottom: 14px;
}
.projeto__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.projeto__tags span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.projeto__year {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
  text-align: right;
}
.projeto__arrow {
  font-size: 24px;
  color: var(--text-mute);
  transition: all 0.4s var(--ease);
}
.projeto:hover .projeto__arrow {
  color: var(--accent);
  transform: rotate(-45deg) scale(1.2);
}

/* ---------- HABILIDADES ---------- */
.hab__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.hab__col {
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
}
.hab__col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 20px;
}
.hab__col ul { list-style: none; }
.hab__col li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--line);
  position: relative;
  padding-left: 18px;
  transition: color 0.3s, padding-left 0.3s;
}
.hab__col li::before {
  content: '◆';
  position: absolute; left: 0;
  color: var(--text-mute);
  font-size: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: color 0.3s, transform 0.3s;
}
.hab__col li:hover { color: var(--text); padding-left: 24px; }
.hab__col li:hover::before { color: var(--accent); transform: translateY(-50%) rotate(45deg); }

/* ---------- FORMAÇÃO / TIMELINE ---------- */
.timeline__group-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border-top: 1px solid var(--line-2);
  padding-top: 24px;
  margin-top: 40px;
  margin-bottom: -8px;
}
.timeline__group-title:first-of-type {
  margin-top: 0;
}
.timeline {
  list-style: none;
  position: relative;
  max-width: 900px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 80px; top: 12px; bottom: 12px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, var(--line) 30%, var(--line) 100%);
}
.timeline__item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 40px;
  padding: 24px 0;
  position: relative;
}
.timeline__item::before {
  content: '';
  position: absolute;
  left: 76px; top: 32px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  transition: all 0.3s;
}
.timeline__item:hover::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(212, 255, 58, 0.15);
}
.timeline__date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
  padding-top: 4px;
}
.timeline__content h4 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.timeline__content span {
  display: block;
  font-size: 12px;
  color: var(--accent-warm);
  font-style: italic;
  margin-bottom: 10px;
}
.timeline__content p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 540px;
}

/* ---------- CONTATO ---------- */
.contato__wrap {
  text-align: center;
  padding: 40px 0;
}
.contato__big {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 7vw, 110px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.contato__big em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.contato__sub {
  color: var(--text-dim);
  max-width: 460px;
  margin: 0 auto 48px;
  font-size: 15px;
}
.contato__email {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 400;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--text);
  margin-bottom: 48px;
  transition: all 0.3s;
}
.contato__email:hover {
  color: var(--accent);
  border-color: var(--accent);
  letter-spacing: 0.01em;
}
.contato__social {
  display: flex; justify-content: center; gap: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.contato__social a {
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}
.contato__social a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.contato__social a:hover { color: var(--accent); }
.contato__social a:hover::after { width: 100%; }

/* ---------- FOOTER ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  border-top: 1px solid var(--line);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  position: relative;
  z-index: 2;
}
.footer__center { text-align: center; }
.footer__right { text-align: right; }
.footer .heart { color: var(--accent); }
.footer button {
  font-family: inherit;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.footer button:hover { color: var(--accent); }

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.hero__title .line > * {
  opacity: 0;
  transform: translateY(100%);
  animation: reveal-line 1.1s var(--ease) forwards;
}
.hero__title .line:nth-child(1) > * { animation-delay: 0.2s; }
.hero__title .line:nth-child(2) > * { animation-delay: 0.4s; }
.hero__title .line:nth-child(3) > * { animation-delay: 0.6s; }
@keyframes reveal-line {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVO ---------- */
@media (max-width: 900px) {
  .nav { padding: 18px 24px; }
  .nav__links { display: none; }
  .nav__menu { display: flex; }
  .hero { padding: 120px 24px 100px; }
  .hero__title { margin: 40px 0; }
  .hero__bottom { grid-template-columns: 1fr; gap: 32px; }
  .hero__scroll { display: none; }
  .section { padding: 80px 24px; }
  .section__head { margin-bottom: 48px; }
  .sobre__grid { grid-template-columns: 1fr; gap: 40px; }
  .projeto {
    grid-template-columns: 40px 1fr 28px;
    gap: 16px;
  }
  .projeto__year { display: none; }
  .hab__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .timeline::before { left: 8px; }
  .timeline__item { grid-template-columns: 1fr; gap: 6px; padding-left: 30px; }
  .timeline__item::before { left: 4px; top: 30px; }
  .footer { grid-template-columns: 1fr; text-align: center; gap: 12px; padding: 32px 24px; }
  .footer__center, .footer__right { text-align: center; }
  .cursor-dot, .cursor-ring { display: none; }
  body, a, button { cursor: auto; }
}

@media (max-width: 560px) {
  .hab__grid { grid-template-columns: 1fr; }
  .contato__social { flex-wrap: wrap; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}