/* ═══════════════════════════════════════
   style.css — Renan Leite Portfolio
   ═══════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  --bg:          #080c14;
  --bg2:         #0e1420;
  --bg3:         #141b2a;
  --border:      rgba(255, 255, 255, 0.07);
  --text:        #e8eaf0;
  --muted:       #6b7a99;
  --accent:      #00e5a0;
  --accent2:     #3b82f6;
  --accent-glow: rgba(0, 229, 160, 0.18);

  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

/* ─── NOISE OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
nav {
  position:   fixed;
  top: 0; left: 0; right: 0;
  z-index:    100;
  display:    flex;
  align-items: center;
  justify-content: space-between;
  padding:    1.2rem 4rem;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size:   0.9rem;
  color:       var(--accent);
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--muted); }

.nav-links {
  display:     flex;
  gap:         2.5rem;
  list-style:  none;
  font-family: var(--font-mono);
  font-size:   0.78rem;
  letter-spacing: 0.08em;
  color:       var(--muted);
  text-transform: uppercase;
}
.nav-links li { cursor: pointer; transition: color .2s; }
.nav-links li:hover { color: var(--accent); }

.nav-cta {
  font-family: var(--font-mono);
  font-size:   0.78rem;
  border:      1px solid var(--accent);
  color:       var(--accent);
  padding:     0.45rem 1.1rem;
  border-radius: 4px;
  transition:  background .2s, color .2s;
}
.nav-cta:hover { background: var(--accent); color: var(--bg); }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display:    flex;
  align-items: center;
  padding:    8rem 4rem 5rem;
  position:   relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:     4rem;
  align-items: center;
  max-width: 1200px;
  margin:  0 auto;
  width:   100%;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  display:     flex;
  align-items: center;
  gap:         0.7rem;
}
.hero-tag::before {
  content: '';
  display: block;
  width:   24px;
  height:  1px;
  background: var(--accent);
}

h1 {
  font-family: var(--font-display);
  font-size:   clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h1 .line2 { color: var(--accent); }

.hero-sub {
  margin-top: 1.5rem;
  color:      var(--muted);
  font-size:  1.05rem;
  max-width:  440px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-actions {
  display:     flex;
  gap:         1rem;
  margin-top:  2.5rem;
  flex-wrap:   wrap;
}

/* ─── Buttons ─── */
.btn-primary {
  background:  var(--accent);
  color:       var(--bg);
  font-family: var(--font-mono);
  font-size:   0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding:     0.8rem 1.8rem;
  border-radius: 6px;
  transition:  opacity .2s, transform .2s;
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-ghost {
  border:      1px solid var(--border);
  color:       var(--muted);
  font-family: var(--font-mono);
  font-size:   0.8rem;
  letter-spacing: 0.06em;
  padding:     0.8rem 1.8rem;
  border-radius: 6px;
  transition:  border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Terminal Card ─── */
.hero-terminal {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: 12px;
  overflow:      hidden;
  box-shadow:    0 0 80px rgba(0,229,160,0.07), 0 30px 60px rgba(0,0,0,0.5);
}

.terminal-bar {
  background:    var(--bg3);
  padding:       0.8rem 1.2rem;
  display:       flex;
  align-items:   center;
  gap:           0.5rem;
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f56; }
.dot.y { background: #ffbd2e; }
.dot.g { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--muted);
  margin-left: auto;
  margin-right: auto;
}

.terminal-body {
  padding:     1.8rem;
  font-family: var(--font-mono);
  font-size:   0.82rem;
  line-height: 2;
}

/* Terminal syntax colors */
.t-prompt { color: var(--accent); }
.t-cmd    { color: var(--text); }
.t-out    { color: var(--muted); padding-left: 1.2rem; }
.t-key    { color: var(--accent2); }
.t-val    { color: #f9a825; }
.t-string { color: #e06c75; }

.cursor {
  display:     inline-block;
  width:       8px;
  height:      14px;
  background:  var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation:   blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ═══════════════════════════════════════
   SECTION COMMONS
   ═══════════════════════════════════════ */
section { padding: 6rem 4rem; position: relative; }

.section-inner {
  max-width: 1200px;
  margin:    0 auto;
  position:  relative;
  z-index:   1;
}

.section-label {
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

h2 {
  font-family: var(--font-display);
  font-size:   clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

/* ─── Background Glow Orbs ─── */
.glow-orb {
  position:      absolute;
  border-radius: 50%;
  filter:        blur(100px);
  pointer-events: none;
  z-index:       0;
}
.orb1 { width: 500px; height: 500px; background: rgba(0,229,160,0.04); top: -100px; right: -100px; }
.orb2 { width: 400px; height: 400px; background: rgba(59,130,246,0.04); bottom: 0; left: -100px; }

/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
#about {
  background:    var(--bg2);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap:     5rem;
  align-items: start;
}

.about-card {
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: 12px;
  padding:       2rem;
}
.about-card-title {
  font-family: var(--font-mono);
  font-size:   0.72rem;
  color:       var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}

.info-row {
  display:         flex;
  justify-content: space-between;
  padding:         0.65rem 0;
  border-bottom:   1px solid var(--border);
  font-size:       0.88rem;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; }
.info-val { color: var(--text); font-weight: 500; }
.info-val.accent { color: var(--accent); }

.about-text p {
  color:       var(--muted);
  font-size:   1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.about-text p strong { color: var(--text); font-weight: 500; }

.about-badges {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.5rem;
  margin-top: 1.5rem;
}

.badge {
  font-family:  var(--font-mono);
  font-size:    0.72rem;
  background:   var(--bg3);
  border:       1px solid var(--border);
  color:        var(--muted);
  padding:      0.3rem 0.7rem;
  border-radius: 4px;
}
.badge.highlight {
  border-color: var(--accent);
  color:        var(--accent);
  background:   var(--accent-glow);
}

/* ═══════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════ */
.skills-header { margin-bottom: 3rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:     1.5rem;
}

.skill-group {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: 12px;
  padding:       1.8rem;
  transition:    border-color .25s;
}
.skill-group:hover { border-color: rgba(0, 229, 160, 0.3); }

.skill-group-icon  { font-size: 1.5rem; margin-bottom: 0.8rem; }
.skill-group-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size:   0.95rem;
  margin-bottom: 1rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skill-tag {
  font-family:  var(--font-mono);
  font-size:    0.72rem;
  padding:      0.3rem 0.65rem;
  border-radius: 4px;
  background:   var(--bg3);
  border:       1px solid var(--border);
  color:        var(--muted);
  transition:   all .2s;
}
.skill-group:hover .skill-tag { border-color: rgba(0, 229, 160, 0.2); }
.skill-tag.primary {
  background:   var(--accent-glow);
  border-color: rgba(0, 229, 160, 0.4);
  color:        var(--accent);
}

/* ═══════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════ */
#projects {
  background:    var(--bg2);
  border-top:    1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap:        2rem;
  margin-top: 3rem;
}

.project-card {
  background:    var(--bg);
  border:        1px solid var(--border);
  border-radius: 14px;
  overflow:      hidden;
  display:       flex;
  flex-direction: column;
  transition:    border-color .3s, transform .3s, box-shadow .3s;
}
.project-card:hover {
  border-color: rgba(0, 229, 160, 0.35);
  transform:    translateY(-4px);
  box-shadow:   0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,229,160,0.05);
}

.project-header {
  padding:       2rem 2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.project-badge {
  font-family:  var(--font-mono);
  font-size:    0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color:        var(--accent);
  background:   var(--accent-glow);
  border:       1px solid rgba(0, 229, 160, 0.3);
  padding:      0.25rem 0.6rem;
  border-radius: 3px;
  display:      inline-block;
  margin-bottom: 1rem;
}
.project-badge.blue {
  color:      var(--accent2);
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.project-title {
  font-family: var(--font-display);
  font-size:   1.4rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.project-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.7; }

.project-body { padding: 1.5rem 2rem; flex: 1; }

.project-arch {
  font-family:  var(--font-mono);
  font-size:    0.72rem;
  color:        var(--muted);
  margin-bottom: 1.2rem;
  border-left:  2px solid var(--accent);
  padding-left: 0.8rem;
  line-height:  1.9;
}
.project-arch span { color: var(--accent2); }

.project-tags {
  display:    flex;
  flex-wrap:  wrap;
  gap:        0.4rem;
  margin-top: 1.2rem;
}

.project-tag {
  font-family:  var(--font-mono);
  font-size:    0.68rem;
  padding:      0.25rem 0.55rem;
  border-radius: 3px;
  background:   var(--bg3);
  border:       1px solid var(--border);
  color:        var(--muted);
}

.project-footer {
  padding:     1.2rem 2rem;
  border-top:  1px solid var(--border);
  display:     flex;
  gap:         1rem;
  align-items: center;
}

.proj-link {
  font-family: var(--font-mono);
  font-size:   0.75rem;
  color:       var(--muted);
  display:     flex;
  align-items: center;
  gap:         0.4rem;
  transition:  color .2s;
}
.proj-link:hover { color: var(--accent); }
.proj-link svg { width: 14px; height: 14px; }

.wip-pill {
  margin-left:  auto;
  font-family:  var(--font-mono);
  font-size:    0.65rem;
  background:   rgba(249, 168, 37, 0.1);
  border:       1px solid rgba(249, 168, 37, 0.3);
  color:        #f9a825;
  padding:      0.2rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.08em;
}

/* ─── Microservices Diagram ─── */
.ms-diagram {
  background:    var(--bg3);
  border:        1px solid var(--border);
  border-radius: 8px;
  padding:       1.2rem;
  font-family:   var(--font-mono);
  font-size:     0.72rem;
  color:         var(--muted);
  line-height:   2;
  margin-top:    1rem;
}
.ms-service {
  display:      inline-block;
  background:   var(--bg2);
  border:       1px solid rgba(0, 229, 160, 0.25);
  color:        var(--accent);
  padding:      0.15rem 0.5rem;
  border-radius: 3px;
  margin:       0.1rem;
}
.ms-arrow { color: var(--border); }

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:     5rem;
  align-items: center;
}

.contact-links {
  display:       flex;
  flex-direction: column;
  gap:           1rem;
  margin-top:    2rem;
}

.contact-link {
  display:       flex;
  align-items:   center;
  gap:           1rem;
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: 10px;
  padding:       1.1rem 1.5rem;
  transition:    border-color .25s, transform .25s;
}
.contact-link:hover {
  border-color: rgba(0, 229, 160, 0.4);
  transform:    translateX(4px);
}

.contact-icon {
  width:         38px;
  height:        38px;
  border-radius: 8px;
  background:    var(--accent-glow);
  border:        1px solid rgba(0, 229, 160, 0.25);
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1rem;
  flex-shrink:   0;
}

.contact-info-label {
  font-family: var(--font-mono);
  font-size:   0.68rem;
  color:       var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.contact-info-val { font-size: 0.95rem; font-weight: 500; margin-top: 0.1rem; }

/* ─── Status Card ─── */
.status-card {
  background:    var(--bg2);
  border:        1px solid var(--border);
  border-radius: 14px;
  padding:       2.5rem;
  text-align:    center;
}

.status-dot {
  display:       inline-block;
  width:         10px;
  height:        10px;
  background:    var(--accent);
  border-radius: 50%;
  box-shadow:    0 0 10px var(--accent);
  animation:     pulse 2s ease-in-out infinite;
  margin-right:  0.5rem;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.3); }
}

.status-text  { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); }
.status-title { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; margin: 1.5rem 0 0.5rem; }
.status-sub   { color: var(--muted); font-size: 0.9rem; }

.status-divider { width: 40px; height: 2px; background: var(--accent); margin: 1.5rem auto; }

.status-stats { display: flex; gap: 0; margin-top: 1.5rem; }

.stat-item { flex: 1; padding: 1rem; border: 1px solid var(--border); }
.stat-item:first-child { border-radius: 8px 0 0 8px; }
.stat-item:last-child  { border-radius: 0 8px 8px 0; }
.stat-item:not(:last-child) { border-right: none; }

.stat-num   { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem; }

.status-checklist {
  margin-top:  2rem;
  font-family: var(--font-mono);
  font-size:   0.75rem;
  color:       var(--muted);
  line-height: 1.8;
  text-align:  left;
}
.status-checklist .check { color: var(--accent); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
footer {
  border-top:  1px solid var(--border);
  padding:     2rem 4rem;
  display:     flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.footer-copy span { color: var(--accent); }

.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

/* ═══════════════════════════════════════
   SCROLL REVEAL ANIMATION
   ═══════════════════════════════════════ */
.reveal {
  opacity:    0;
  transform:  translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  nav          { padding: 1rem 1.5rem; }
  .nav-links,
  .nav-cta     { display: none; }

  section      { padding: 4rem 1.5rem; }
  #hero        { padding: 7rem 1.5rem 4rem; }

  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

  .hero-terminal { display: none; }
  .projects-grid { grid-template-columns: 1fr; }

  footer {
    flex-direction: column;
    gap:    1rem;
    padding: 1.5rem;
    text-align: center;
  }
  .footer-links { justify-content: center; }
}