:root {
  --bg: #08090a;
  --bg-2: #0f1112;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef1ea;
  --muted: #8d928b;
  --accent: #b6ff3c;
  --accent-2: #7c5cff;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* grão sutil por cima de tudo */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: #000; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: normal; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* NAV */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 8px 10px 8px 20px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(12, 13, 14, 0.6); backdrop-filter: blur(16px) saturate(1.4);
  max-width: calc(100vw - 2 * var(--gutter));
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-color: var(--line-2); background: rgba(12, 13, 14, 0.82); }
.logo { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 20px; font-size: 14px; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.lang {
  display: flex; align-items: center; gap: 6px;
  font: 500 12px var(--mono); color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 12px; cursor: pointer; transition: border-color .2s;
}
.lang:hover { border-color: var(--accent); }
.lang i { width: 1px; height: 10px; background: var(--line-2); }
.lang .on { color: var(--accent); }

/* HERO */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
#graph { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(124, 92, 255, 0.20), transparent 70%),
    radial-gradient(50% 45% at 10% 85%, rgba(182, 255, 60, 0.11), transparent 70%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero-inner { position: relative; padding-top: 110px; padding-bottom: 90px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(182, 255, 60, 0.6); animation: ping 2.2s infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 10px rgba(182, 255, 60, 0); } }

.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(60px, 15.5vw, 220px);
  line-height: 0.88; letter-spacing: -0.035em;
  margin: 22px 0 26px -0.04em;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(100deg, var(--accent) 10%, #e9ffc2 45%, var(--accent-2) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;
}
.js .hero-title .line { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.js .hero-title .line:nth-child(2) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

.hero-typed { font: 500 clamp(14px, 1.7vw, 18px) var(--mono); color: var(--text); min-height: 1.6em; }
.prompt { color: var(--accent); }
.caret { display: inline-block; width: 0.55em; height: 1.05em; margin-left: 2px; background: var(--accent); vertical-align: -0.15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lead { max-width: 34ch; margin-top: 18px; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.35; color: #c9cec4; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #0a0d04; }
.btn.primary:hover { box-shadow: 0 10px 40px -8px rgba(182, 255, 60, 0.55); }
.btn.ghost { border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }
.btn.ghost:hover { border-color: var(--accent); }

.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 22px; height: 36px; margin-left: -11px; border: 1px solid var(--line-2); border-radius: 12px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 60%, 100% { transform: translateY(12px); opacity: 0; } }

/* MARQUEE */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.marquee-track span { font: 600 clamp(18px, 2.4vw, 28px) var(--display); color: var(--muted); padding: 0 26px; white-space: nowrap; }
.marquee-track span::after { content: "✦"; color: var(--accent); margin-left: 52px; font-size: 0.6em; vertical-align: middle; }
@keyframes slide { to { transform: translateX(-50%); } }

/* SECTIONS */
.section { padding: clamp(80px, 12vw, 160px) 0 0; }
.kicker { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 26px; }
.kicker span:first-child { color: var(--accent); margin-right: 8px; }
.title { font: 700 clamp(34px, 5.4vw, 68px)/1 var(--display); letter-spacing: -0.04em; margin-bottom: clamp(32px, 5vw, 56px); }
.title.sub { font-size: clamp(26px, 3.4vw, 40px); margin-top: clamp(56px, 8vw, 96px); margin-bottom: 28px; }
.big { font: 600 clamp(28px, 4.2vw, 54px)/1.08 var(--display); letter-spacing: -0.035em; }
.huge { font: 800 clamp(40px, 8.6vw, 118px)/0.95 var(--display); letter-spacing: -0.05em; max-width: 14ch; }

.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: end; margin-bottom: clamp(48px, 7vw, 88px); }
.about-text { display: grid; gap: 16px; color: var(--muted); }

/* CARDS */
.cards { display: grid; gap: 14px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  --mx: 50%; --my: 0%;
  position: relative; display: block; overflow: hidden;
  padding: 26px 24px 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-2);
  transition: border-color .25s, transform .25s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(182, 255, 60, 0.13), transparent 65%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card-n { display: block; font: 500 12px var(--mono); color: var(--accent); margin-bottom: 44px; letter-spacing: 0.02em; }
.card h3 { font: 700 22px/1.15 var(--display); letter-spacing: -0.02em; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.project:hover { transform: translateY(-4px); }
.project h3 i { font-style: normal; display: inline-block; color: var(--muted); transition: transform .25s, color .25s; }
.project:hover h3 i { transform: translate(3px, -3px); color: var(--accent); }

/* TIMELINE */
.timeline { border-top: 1px solid var(--line); }
.timeline > li { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.tag.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tl-body h3 { font: 700 clamp(26px, 3.6vw, 42px)/1.05 var(--display); letter-spacing: -0.035em; }
.tl-body h3 a { color: var(--muted); font-size: 0.6em; margin-left: 6px; transition: color .2s; }
.tl-body h3 a:hover { color: var(--accent); }
.role { font: 500 13px var(--mono); color: var(--accent); margin: 10px 0 14px; }
.tl-body > p:not(.role) { color: var(--muted); max-width: 62ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li { font: 500 12px var(--mono); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: #c9cec4; background: rgba(255, 255, 255, 0.02); }
.chips.lg { margin-top: 0; }
.chips.lg li { font-size: 14px; padding: 9px 16px; transition: border-color .2s, color .2s, transform .2s; }
.chips.lg li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* STACK */
.stack { border-top: 1px solid var(--line); }
.stack-row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.stack-row h3 { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.learning { margin-top: 40px; padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius); }
.learning h3 { font: 500 13px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.learning ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 32px; color: #c9cec4; }
.learning li::before { content: "→ "; color: var(--muted); }

/* CONTACT + FOOTER */
.contact { padding-bottom: clamp(80px, 12vw, 150px); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }
.footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 13px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* REVEAL */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .cards.three { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { gap: 12px; padding-left: 16px; }
  .nav-links { display: none; }
  .cards.four, .cards.three, .cards.two { grid-template-columns: 1fr; }
  .card-n { margin-bottom: 28px; }
  .timeline > li, .stack-row { grid-template-columns: 1fr; gap: 12px; }
  .learning ul { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* FOTO + PROJETO EM DESTAQUE */
.portrait { width: min(100%, 300px); height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: 0 0 0 6px rgba(182, 255, 60, 0.07); margin-bottom: 8px; }
.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); background: var(--bg-2); overflow: hidden; }
.feature .card-n { margin-bottom: 18px; }
.feature h3 { font: 800 clamp(40px, 6vw, 76px)/1 var(--display); letter-spacing: -0.045em; margin-bottom: 16px; }
.feature p { color: var(--muted); max-width: 46ch; margin-bottom: 26px; }
.feature-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: center; }
.feature-shots img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid var(--line-2); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.feature-shots img:nth-child(2) { transform: translateY(-18px); }
.feature:hover .feature-shots img:nth-child(1) { transform: translateY(-8px) rotate(-2deg); }
.feature:hover .feature-shots img:nth-child(3) { transform: translateY(-8px) rotate(2deg); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature-shots { padding-top: 18px; } }
@media (min-width: 561px) and (max-width: 980px) {
  .about-text { grid-template-columns: 240px 1fr; column-gap: 32px; align-content: center; }
  .about-text .portrait { grid-row: 1 / span 2; margin-bottom: 0; }
  .about-text p:first-of-type { align-self: end; }
  .about-text p:last-of-type { align-self: start; }
}
