/* =====================================================
   Vitor Melo — Backend Developer · premium landing
   ===================================================== */

:root {
  --bg: #04070a;
  --bg-2: #060c0a;
  --green: #7CFF4F;
  --green-2: #5be83a;
  --green-deep: #2a7a1c;
  --text: #f3f6f3;
  --muted: #8b9690;
  --muted-2: #5f6b64;
  --card: rgba(255, 255, 255, 0.022);
  --card-hover: rgba(124, 255, 79, 0.05);
  --border: rgba(255, 255, 255, 0.06);
  --border-green: rgba(124, 255, 79, 0.28);
  --radius: 26px;
  --radius-lg: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 300ms;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
  --glow: 0 0 40px -8px rgba(124, 255, 79, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
}

body.loading { overflow: hidden; }

::selection { background: rgba(124, 255, 79, 0.28); color: #fff; }

a { text-decoration: none; color: inherit; }

svg { display: block; }
.i16 { width: 16px; height: 16px; }
.i18 { width: 18px; height: 18px; }
.i20 { width: 20px; height: 20px; }
.i22 { width: 22px; height: 22px; }
.i24 { width: 24px; height: 24px; }
.i26 { width: 26px; height: 26px; }

.accent { color: var(--green); }

/* ============ FIXED FX LAYERS ============ */
.fx-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(720px 520px at 50% -6%, rgba(124, 255, 79, 0.16), transparent 60%),
    radial-gradient(900px 700px at 82% 8%, rgba(40, 122, 28, 0.20), transparent 55%),
    radial-gradient(700px 900px at 12% 78%, rgba(124, 255, 79, 0.07), transparent 60%),
    radial-gradient(600px 500px at 50% 108%, rgba(40, 122, 28, 0.16), transparent 60%);
}

.fx-grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.fx-skyline {
  position: fixed; z-index: 1; pointer-events: none;
  top: 4%; left: 50%; transform: translateX(-50%);
  width: min(1400px, 132vw); color: #0e1512; opacity: 0.9;
  will-change: transform;
}
.fx-skyline svg { width: 100%; height: auto;
  filter: drop-shadow(0 0 30px rgba(124, 255, 79, 0.06)); }

/* ============ CUSTOM CURSOR ============ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; mix-blend-mode: difference;
}
.cursor {
  width: 34px; height: 34px; border: 1.5px solid rgba(124, 255, 79, 0.9);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.cursor-dot {
  width: 5px; height: 5px; background: var(--green); transform: translate(-50%, -50%);
}
.cursor.hovering { width: 58px; height: 58px; background: rgba(124, 255, 79, 0.12); border-color: transparent; }

/* ============ SCROLL WRAPPER (lerp smooth) ============ */
.scroll { position: relative; z-index: 3; width: 100%; will-change: transform; }

/* ============ SHELL ============ */
.shell {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 22px 56px;
}

/* ============ TOPBAR ============ */
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 26px;
}
.brand { display: flex; flex-direction: column; position: relative; }
.brand-line { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.28; }
.brand-code {
  margin-top: 8px; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; color: var(--green);
  border: 1px solid var(--border-green); background: rgba(124, 255, 79, 0.05);
}

.loc-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.loc-pill:hover { border-color: var(--border-green); background: rgba(124, 255, 79, 0.06); }
.loc-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 10px 1px var(--green); animation: pulse 2.4s var(--ease) infinite;
}
.flag { font-size: 15px; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.82); } }

/* ============ HERO ============ */
.hero { text-align: center; }

.avatar-wrap {
  position: relative; width: 232px; height: 232px; margin: 6px auto 26px;
  border-radius: 50%; will-change: transform;
  transition: transform 300ms var(--ease);
}
.avatar-wrap:hover { transform: scale(1.04); }
.avatar-wrap:hover .avatar-glow { opacity: 1; transform: scale(1.14); }
.avatar-wrap:hover .avatar-img { box-shadow: 0 0 36px 4px rgba(124, 255, 79, 0.5); }
.avatar-ring {
  position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 210deg, var(--green), #1c4b12, var(--green-2), #123a0b, var(--green));
  filter: blur(0.4px);
  animation: spin 8s linear infinite;
}
.avatar-glow {
  position: absolute; inset: -22px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(124,255,79,0.42), transparent 68%);
  filter: blur(14px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.avatar-img {
  position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px);
  border-radius: 50%; object-fit: cover; object-position: center 22%;
  border: 3px solid var(--bg);
  transition: box-shadow 300ms var(--ease);
}
@keyframes spin { to { transform: rotate(360deg); } }

.name {
  font-size: clamp(52px, 12vw, 76px); font-weight: 900; letter-spacing: -0.04em;
  line-height: 0.98; margin-bottom: 12px;
}
.reveal-line { display: block; overflow: hidden; padding-bottom: 4px; }
.reveal-inner { display: block; }

.role {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 22px; font-weight: 600; color: #dfe6df; margin-bottom: 28px;
}
.role-prompt { font-family: 'JetBrains Mono', monospace; color: var(--green); font-weight: 600; }
.role-typed { display: inline-flex; align-items: center; }
.role-text { display: inline-block; min-width: 18ch; text-align: left; }
.role-caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 1px;
  background: var(--green); box-shadow: 0 0 8px rgba(124,255,79,0.8);
  animation: caret 1.05s steps(1) infinite; transform: translateY(2px);
}
@keyframes caret { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* Badges glass card */
.badges {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 18px 14px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012));
  border: 1px solid var(--border);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.04);
  margin-bottom: 26px;
}
.badge { display: flex; align-items: center; gap: 9px; flex: 1; justify-content: center; padding: 0 4px; }
.badge-ic { color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.badge-ic.flag { font-size: 20px; }
.badge-txt { font-size: 14px; font-weight: 600; color: #d7ded7; text-align: left; line-height: 1.25; }
.badge-sep { width: 1px; align-self: stretch; background: var(--border); }

.desc {
  font-size: 18px; line-height: 1.6; color: var(--muted); font-weight: 500;
  max-width: 500px; margin: 0 auto 40px;
}

/* ============ LINK CARDS ============ */
.links { display: flex; flex-direction: column; gap: 14px; }

.card {
  position: relative; display: flex; align-items: center; gap: 18px;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease), box-shadow var(--t) var(--ease);
  will-change: transform;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(124,255,79,0.10), transparent 62%);
  transition: opacity var(--t) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 255, 79, 0.42);
  background: var(--card-hover);
  box-shadow: 0 30px 70px -28px rgba(0,0,0,0.95), 0 0 0 1px rgba(124,255,79,0.18), var(--glow);
}
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-1px) scale(0.994); }

.card-icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: var(--green);
  border: 1.5px solid var(--border-green);
  background: rgba(124, 255, 79, 0.045);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.card:hover .card-icon {
  transform: scale(1.06); background: rgba(124,255,79,0.1);
  box-shadow: 0 0 22px -4px rgba(124,255,79,0.6);
}
.card-body { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; color: #fff; }
.card-sub { font-size: 14.5px; color: var(--muted); font-weight: 500; }
.card-chev {
  flex-shrink: 0; color: var(--muted); display: grid; place-items: center;
  transition: transform var(--t) var(--ease), color var(--t) var(--ease);
}
.card:hover .card-chev { color: var(--green); transform: translateX(5px); }

/* ============ HIGHLIGHT ============ */
.highlight {
  position: relative; display: flex; align-items: center; gap: 18px;
  margin-top: 26px; padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(124,255,79,0.06), rgba(255,255,255,0.014));
  border: 1px solid var(--border-green);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
  will-change: transform;
}
.highlight:hover { transform: translateY(-4px); box-shadow: 0 30px 70px -28px rgba(0,0,0,0.95), var(--glow); }
.hl-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  color: var(--green); border: 1px solid var(--border-green); background: rgba(124,255,79,0.07);
}
.hl-text { flex: 1; font-size: 16px; font-weight: 600; line-height: 1.45; color: #eef3ee; }
.hl-code {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: var(--green); border: 1px solid var(--border-green); background: rgba(124,255,79,0.05);
  transition: transform var(--t) var(--ease);
}
.highlight:hover .hl-code { transform: scale(1.08) rotate(-4deg); }

/* ============ FOOTER ============ */
.footer { margin-top: 46px; text-align: center; }

.tech-marquee {
  position: relative; overflow: hidden; margin-bottom: 30px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.tech-track { display: inline-flex; gap: 48px; white-space: nowrap; animation: marquee 26s linear infinite; }
.tech-item {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500;
  color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em;
}
.tech-item svg { color: var(--green-deep); }
@keyframes marquee { to { transform: translateX(-50%); } }

.tech-icons { display: flex; align-items: center; justify-content: center; gap: 26px; margin-bottom: 22px; }
.tech-ic {
  color: var(--green); opacity: 0.85; cursor: pointer;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease), filter var(--t) var(--ease);
}
.tech-ic:hover {
  transform: translateY(-4px) scale(1.14); opacity: 1;
  filter: drop-shadow(0 0 12px rgba(124,255,79,0.7));
}

.copy { font-size: 13px; color: var(--muted-2); font-weight: 500; }

/* ============ REVEAL ANIMATIONS ============ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

.reveal-inner { transform: translateY(105%); transition: transform 1s var(--ease); }
.name.in .reveal-inner { transform: none; }

.avatar-wrap[data-reveal] { transform: translateY(26px) scale(0.9); }
.avatar-wrap[data-reveal].in { transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal], .reveal-inner { opacity: 1 !important; transform: none !important; }
  body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 560px) {
  .shell { padding: 28px 16px 44px; }
  .topbar { margin-bottom: 20px; }
  .brand-line { font-size: 15px; }
  .loc-pill { padding: 8px 13px; font-size: 12.5px; }
  .avatar-wrap { width: 188px; height: 188px; }
  .role { font-size: 19px; }
  .role-text { min-width: 15ch; }
  .badges { gap: 4px; padding: 16px 8px; }
  .badge { flex-direction: column; gap: 7px; text-align: center; padding: 0 4px; }
  .badge-txt { font-size: 12px; text-align: center; line-height: 1.3; }
  .badge-ic.flag { font-size: 18px; }
  .desc { font-size: 16px; }
  .card { padding: 16px 16px; gap: 14px; }
  .card-icon { width: 48px; height: 48px; }
  .card-title { font-size: 17px; }
  .card-sub { font-size: 13px; }
  .hl-text { font-size: 14.5px; }
  .tech-icons { gap: 18px; }
}

@media (max-width: 380px) {
  .shell { padding: 24px 12px 40px; }
  .badges { gap: 2px; padding: 14px 6px; }
  .badge { gap: 6px; padding: 0 2px; }
  .badge-txt { font-size: 10.5px; }
  .badge-ic svg { width: 16px; height: 16px; }
  .badge-ic.flag { font-size: 16px; }
  .role { font-size: 17px; gap: 7px; }
  .role-text { min-width: 14ch; }
  .avatar-wrap { width: 168px; height: 168px; }
}

@media (hover: none) { body { cursor: auto; } .cursor, .cursor-dot { display: none; } }
