/* =========================================================
   Patrick Bandeira — Desenvolvimento de Software
   Dark Tech theme · MOBILE-FIRST
   (estilos base = mobile; media queries min-width escalam pra cima)
   ========================================================= */

:root {
  --bg:        #0d0d12;
  --bg-alt:    #101018;
  --card:      #16161f;
  --card-2:    #1c1c28;
  --border:    #262632;
  --text:      #e8e8ef;
  --muted:     #9a9aae;
  --accent:    #17d95a;
  --accent-2:  #FCB61A;
  --accent-soft: rgba(23, 217, 90, 0.14);
  --radius:    16px;
  --shadow:    0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; }

::selection { background: var(--accent); color: #07160d; }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 10px; transition: all .2s ease; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #3af07a);
  color: #07160d; border: none; font-weight: 700;
  box-shadow: 0 8px 24px -8px rgba(23, 217, 90, .7);
}
.btn-accent:hover, .btn-accent:focus { color: #07160d; transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(23, 217, 90, .85); }

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover, .btn-ghost:focus { color: #fff; border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

.btn i { margin-right: .35rem; }

/* ---------- Navbar ---------- */
.glass-nav {
  padding: .7rem 0;
  background: rgba(13, 13, 18, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
}
.navbar-brand { display: flex; align-items: center; gap: .55rem; color: var(--text) !important; }
.brand-mark { font-family: var(--mono); color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: .98rem; font-weight: 700; }
.brand-sub { font-size: .68rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }

.glass-nav .nav-link {
  color: var(--muted) !important;
  font-weight: 500; font-size: .95rem;
  padding: .5rem .9rem !important; border-radius: 8px;
  transition: color .2s, background .2s;
}
.glass-nav .nav-link:hover { color: var(--text) !important; background: var(--accent-soft); }
.navbar-toggler { border: 1px solid var(--border); color: var(--text); font-size: 1.4rem; padding: .15rem .5rem; }
.navbar-toggler:focus { box-shadow: none; }

/* ícone social na navbar (ex: LinkedIn) */
.nav-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  color: var(--muted); background: var(--card); border: 1px solid var(--border);
  font-size: 1.15rem;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.nav-social:hover { color: #fff; border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }

.glass-nav .navbar-collapse {
  background: rgba(20, 20, 28, .98);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; margin-top: .8rem;
}

/* language switch */
.lang-switch {
  position: relative;
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  width: max-content;
}
/* thumb que desliza entre PT e EN */
.lang-thumb {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  width: 0; height: 0; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid rgba(23, 217, 90, .45);
  box-shadow: 0 0 12px -2px rgba(23, 217, 90, .5);
}
.lang-switch.ready .lang-thumb {
  transition: transform .38s cubic-bezier(.34, 1.4, .5, 1), width .3s ease, height .3s ease;
}
.lang-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: .35rem;
  background: transparent; border: none; color: var(--muted);
  font-weight: 600; font-size: .8rem; padding: .35rem .7rem; border-radius: 999px;
  cursor: pointer; transition: color .2s ease;
}
.lang-btn .flag { display: inline-flex; border-radius: 50%; overflow: hidden; line-height: 0; opacity: .65; transition: opacity .2s; }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: #fff; }
.lang-btn.active .flag { opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 7.5rem 0 4rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .3; will-change: transform; }
.blob-1 { width: 300px; height: 300px; background: var(--accent); top: -100px; left: -80px; animation: drift1 16s ease-in-out infinite alternate; }
.blob-2 { width: 260px; height: 260px; background: var(--accent-2); bottom: -120px; right: -60px; opacity: .2; animation: drift2 20s ease-in-out infinite alternate; }
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(50px, 40px) scale(1.18); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, -30px) scale(1.12); } }

/* onda de quadradinhos (canvas, roda sozinha no load) */
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
  mask-image: radial-gradient(ellipse 88% 78% at 28% 32%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 88% 78% at 28% 32%, #000 45%, transparent 100%);
}
.hero .container { position: relative; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); font-size: .8rem; font-weight: 500;
  padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.3rem;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.hero-title {
  font-size: 2.15rem; font-weight: 900; line-height: 1.1;
  letter-spacing: -.02em; margin-bottom: 1rem;
  background: linear-gradient(120deg, #ffffff 18%, #7ceaa0 45%, var(--accent-2) 70%, #ffffff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: sheen 9s linear infinite;
}
@keyframes sheen { to { background-position: 220% center; } }
.hero-tagline { color: var(--muted); font-size: 1.02rem; max-width: 540px; margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.8rem; }
.hero-meta { display: flex; flex-direction: column; gap: .6rem; color: var(--muted); font-size: .9rem; }
.hero-meta i { color: var(--accent); margin-right: .3rem; }

/* cursor piscando no terminal */
.caret { display: inline-block; width: 8px; height: 1.05em; background: #22d3ee; vertical-align: -2px; margin-left: 3px; border-radius: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* entrada em cascata da hero no load */
.hero .col-lg-7 > .reveal:nth-child(1) { transition-delay: .05s; }
.hero .col-lg-7 > .reveal:nth-child(2) { transition-delay: .14s; }
.hero .col-lg-7 > .reveal:nth-child(3) { transition-delay: .23s; }
.hero .col-lg-7 > .reveal:nth-child(4) { transition-delay: .32s; }
.hero .col-lg-7 > .reveal:nth-child(5) { transition-delay: .41s; }
.hero .col-lg-5 > .reveal { transition-delay: .3s; }

/* terminal card */
.terminal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  margin-top: 2.5rem;
}
.terminal-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .7rem 1rem; background: var(--card-2); border-bottom: 1px solid var(--border);
}
.tdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.tdot.red { background: #ff5f56; } .tdot.yellow { background: #ffbd2e; } .tdot.green { background: #27c93f; }
.terminal-file { margin-left: auto; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.terminal-body { margin: 0; padding: 1.2rem 1.3rem; font-family: var(--mono); font-size: .78rem; line-height: 1.85; color: #cfcfe0; overflow-x: auto; }
.terminal-body code { color: inherit; font-family: inherit; }
.c-key { color: #ff9ec6; } .c-fn { color: #22d3ee; } .c-cls { color: #ffd479; }
.c-str { color: #9ae6a0; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: .82rem; letter-spacing: .05em; display: block; margin-bottom: .6rem; }
.section-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 1rem; }
.section-lead { color: var(--text); font-size: 1.05rem; }
.section-text { color: var(--muted); font-size: 1rem; }

/* services */
.service-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.7rem; height: 100%;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-6px) scale(1.03); border-color: var(--accent); box-shadow: var(--shadow); }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid rgba(23,217,90,.25);
  color: var(--accent); font-size: 1.5rem; margin-bottom: 1.1rem;
}
.service-title { font-size: 1.2rem; font-weight: 700; margin-bottom: .6rem; }
.service-desc { color: var(--muted); font-size: .96rem; margin: 0; }

/* stats */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-top: 1.5rem; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem 1rem; text-align: center;
}
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--accent); margin-bottom: .3rem; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .8rem; }

/* skills */
.skill-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; height: 100%; transition: transform .25s, border-color .25s;
}
.skill-card:hover { transform: translateY(-6px) scale(1.03); border-color: var(--accent); box-shadow: var(--shadow); }
.skill-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.1rem; }
.skill-head i { font-size: 1.4rem; color: var(--accent); }
.skill-head h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge-tech {
  background: var(--accent-soft); color: #7ceaa0; border: 1px solid rgba(23,217,90,.25);
  font-size: .8rem; font-weight: 500; padding: .35rem .7rem; border-radius: 8px;
}

/* timeline */
.timeline { position: relative; max-width: 760px; margin: 0 auto; padding-left: 1.2rem; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.tl-item { position: relative; padding-left: 1.6rem; padding-bottom: 1.6rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -1.2rem; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(23,217,90,.18); transition: transform .3s ease, box-shadow .3s ease; }
.tl-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.tl-date { font-family: var(--mono); font-size: .76rem; color: var(--accent); }
.tl-role { font-size: 1.05rem; font-weight: 700; margin: .3rem 0 .1rem; }
.tl-company { color: var(--muted); font-size: .9rem; font-weight: 500; }
.tl-desc { color: var(--muted); font-size: .93rem; margin: .7rem 0 0; }

/* projects */
.project-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; height: 100%;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project-card:hover { transform: translateY(-8px) scale(1.02); border-color: var(--accent); box-shadow: var(--shadow); }
.project-thumb { aspect-ratio: 16 / 9; background: var(--card-2); position: relative; overflow: hidden; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-thumb-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  background: var(--card-2);
  color: var(--muted);
}
.project-thumb-fallback i { font-size: 2.6rem; color: var(--accent); }
.project-thumb-fallback span { font-family: var(--mono); font-size: .9rem; }
.project-body { padding: 1.4rem 1.5rem; }
.project-tag { font-family: var(--mono); font-size: .78rem; color: var(--accent-2); }
.project-name { font-size: 1.3rem; font-weight: 700; margin: .4rem 0 .5rem; color: var(--text); }
.project-desc { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.project-link { color: var(--accent); font-weight: 600; font-size: .92rem; }
.project-card-ghost { border-style: dashed; }
.project-card-ghost .project-thumb-fallback i { color: var(--muted); }

/* contact */
.contact-box {
  background: linear-gradient(160deg, var(--card), var(--bg-alt));
  border: 1px solid var(--border); border-radius: 24px;
  padding: 2.5rem 1.3rem; text-align: center; position: relative; overflow: hidden;
}
.contact-box::before { content: ''; position: absolute; width: 320px; height: 320px; background: var(--accent); filter: blur(120px); opacity: .18; top: -120px; left: 50%; transform: translateX(-50%); }
.contact-box > * { position: relative; z-index: 1; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.8rem; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: .88rem; text-align: center; }
.footer-brand { font-family: var(--mono); color: var(--text); }
.footer-social { display: flex; gap: 1rem; font-size: 1.2rem; justify-content: center; }
.footer-social a { color: var(--muted); transition: color .2s; }
.footer-social a:hover { color: var(--accent); }

/* ---------- interactive spotlight (glow segue o mouse no hover) ---------- */
.spot { position: relative; overflow: hidden; }
.spot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(23, 217, 90, .18), transparent 55%);
}
.spot:hover::after { opacity: 1; }

/* timeline: card sobe + bolinha do card cresce + indicador cyan que desliza */
.tl-item:hover .tl-card { transform: translateY(-4px) scale(1.015); border-color: var(--accent); box-shadow: var(--shadow); }
.tl-item:hover .tl-dot { transform: scale(1.5); box-shadow: 0 0 0 5px rgba(23,217,90,.22); }
.tl-indicator {
  position: absolute; left: 7px; top: 20px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 5px rgba(252, 182, 26, .18), 0 0 18px 4px rgba(252, 182, 26, .55);
  transform: translate(-50%, -50%) scale(.4); opacity: 0;
  z-index: 4; pointer-events: none;
  transition: top .45s cubic-bezier(.22, 1, .36, 1), opacity .3s ease, transform .3s ease;
}
.tl-indicator.active { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* reveal animation — usa `translate` (não `transform`) pra não brigar com o scale do hover */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .6s ease, transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.reveal.visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; translate: none !important; transition: none; }
  .blob, .hero-title, .caret, .pill .dot { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   MIN-WIDTH BREAKPOINTS (escala pra cima)
   ========================================================= */

/* >= 576px (celular grande / phablet) */
@media (min-width: 576px) {
  .hero-title { font-size: 2.6rem; }
  .section-title { font-size: 2rem; }
  .hero-cta .btn { width: auto; }
  .contact-actions .btn { width: auto; }
  .contact-box { padding: 3rem 2rem; }
  .stats-grid { gap: 1rem; }
}

/* >= 768px (tablet) */
@media (min-width: 768px) {
  .section { padding: 5rem 0; }
  .hero { padding: 9rem 0 5rem; }
  .hero-title { font-size: 3.1rem; }
  .hero-tagline { font-size: 1.1rem; }
  .section-title { font-size: 2.3rem; }
  .section-lead { font-size: 1.12rem; }
  .footer .container { text-align: left; }
}

/* >= 992px (desktop) — navbar horizontal */
@media (min-width: 992px) {
  .glass-nav {
    padding: .9rem 0;
    background: rgba(13, 13, 18, 0);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
  }
  .glass-nav.scrolled {
    background: rgba(13, 13, 18, .82);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: .6rem 0;
  }
  .glass-nav .navbar-collapse { background: transparent; border: none; padding: 0; margin-top: 0; }

  .hero { padding: 11rem 0 6rem; }
  .hero-title { font-size: 3.6rem; }
  .hero-meta { flex-direction: row; flex-wrap: wrap; gap: 1.2rem; }
  .terminal { margin-top: 0; }

  .section { padding: 6rem 0; }
  .section-title { font-size: 2.6rem; }
}

/* >= 1200px */
@media (min-width: 1200px) {
  .hero-title { font-size: 4rem; }
}
