/* =========================================================
   Luiz Gustavo Feitoza — Portfolio
   Design tokens
   ========================================================= */

:root{
  --bg:#fafaf9;
  --bg-alt:#f1f2f1;
  --header-bg: rgba(250,250,249,0.82);
  --text:#1b1f23;
  --muted:#5b6570;
  --border: rgba(20,25,30,0.12);
  --accent: oklch(0.46 0.09 210);
  --accent-muted: oklch(0.65 0.05 210);
  --accent-soft: oklch(0.94 0.025 210);
  --on-accent:#fafaf9;
  --grid-line: rgba(20,25,30,0.035);

  --font-sans: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --container-max: 1100px;
  --side-pad: 6vw;
}

[data-theme="dark"]{
  --bg:#0d1013;
  --bg-alt:#15191d;
  --header-bg: rgba(13,16,19,0.82);
  --text:#e7e9ea;
  --muted:#8b959e;
  --border: rgba(255,255,255,0.10);
  --accent: oklch(0.72 0.09 195);
  --accent-muted: oklch(0.5 0.05 195);
  --accent-soft: rgba(70,160,170,0.10);
  --on-accent:#0d1013;
  --grid-line: rgba(255,255,255,0.035);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

html, body{
  margin:0; padding:0;
  -webkit-font-smoothing: antialiased;
}

body{
  font-family: var(--font-sans);
  background:
    repeating-linear-gradient(0deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(90deg, var(--grid-line) 0px, var(--grid-line) 1px, transparent 1px, transparent 48px),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background 0.4s ease, color 0.4s ease;
  padding-bottom: 44px; /* room for fixed cmd bar */
}

a{ text-decoration: none; color: inherit; }
::selection{ background: rgba(60,150,160,0.35); }

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

@keyframes blink{ 0%,49%{ opacity:1; } 50%,100%{ opacity:0; } }

/* ---------- overlays ---------- */

#flash-overlay{
  position: fixed; inset: 0; z-index: 999;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
#flash-overlay.flash{ opacity: 0.12; }

#scroll-progress{
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--accent);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* ---------- header ---------- */

.site-header{
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px var(--side-pad);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.logo{
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.site-nav::-webkit-scrollbar{ display: none; }

.site-nav a{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  transition: color 0.18s ease;
}
.site-nav a:hover{ color: var(--accent); }
.site-nav a .nav-num{ color: var(--accent-muted); }

.header-controls{
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
}

.lang-toggle{
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px;
  cursor: pointer;
  display: flex; gap: 2px;
  color: var(--text);
}
.lang-pill{
  padding: 5px 9px;
  border-radius: 14px;
  transition: background 0.18s ease, color 0.18s ease;
  color: var(--muted);
}
.lang-pill.active{ background: var(--accent); color: var(--on-accent); }

.theme-toggle{
  width: 44px; height: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  position: relative;
  padding: 0;
}
.theme-knob{
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: left 0.25s ease;
}
[data-theme="dark"] .theme-knob{ left: 22px; }

/* ---------- layout ---------- */

main{
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

section{
  padding: 70px 0;
  position: relative;
}

.section-watermark{
  position: absolute; top: -10px; right: 0; z-index: -1;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(90px, 16vw, 200px);
  line-height: 1;
  color: var(--accent);
  opacity: 0.05;
  user-select: none; pointer-events: none;
}
#contato .section-watermark{ left: 50%; right: auto; transform: translateX(-50%); }

.section-label{
  font-family: var(--font-mono); font-size: 13px;
  color: var(--accent); margin-bottom: 18px;
}
.section-label span{ color: var(--muted); }

.reveal{
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in{ opacity: 1; transform: translateY(0); }

h1, h2, h3{ font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; margin: 0; }

/* ---------- hero ---------- */

#hero{
  padding: 80px 0 60px;
}
.hero-main{ max-width: 680px; }

.hero-top-row{
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
}
.hero-status{
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.status-dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s steps(1) infinite;
}

.hero-whoami{
  font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 10px;
}

.hero-name{ font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin: 0 0 14px; letter-spacing: -0.02em; }

.hero-role{
  font-family: var(--font-mono); font-size: clamp(15px, 2vw, 19px); color: var(--accent); margin-bottom: 22px;
}
.hero-role span.label{ color: var(--muted); }
.cursor{
  display: inline-block; background: var(--accent);
  animation: blink 1s steps(1) infinite;
  vertical-align: middle; margin-left: 7px;
}
.cursor.lg{ width: 8px; height: 16px; }
.cursor.sm{ width: 7px; height: 14px; margin-left: 5px; }
.cursor.xs{ width: 6px; height: 12px; margin-left: 5px; }

.terminal-card{
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-alt);
  max-width: 56ch;
  margin: 0 0 28px;
  overflow: hidden;
}
.terminal-bar{
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
}
.terminal-dot{ width: 9px; height: 9px; border-radius: 50%; }
.terminal-dot.red{ background: #e0605a; }
.terminal-dot.yellow{ background: #e0b34d; }
.terminal-dot.green{ background: #5cb85c; }
.terminal-title{ font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.terminal-body{ padding: 16px 18px; }
.terminal-cmd{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.terminal-body p{ font-size: 15px; line-height: 1.7; color: var(--text); margin: 0; }

.hero-ctas{ display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.btn{
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  padding: 13px 22px; border-radius: 6px;
  display: inline-block;
  transition: opacity 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-solid{ background: var(--accent); color: var(--on-accent); }
.btn-solid:hover{ opacity: 0.88; }
.btn-outline{ border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }

.icon-btn{
  width: 44px; height: 44px; border-radius: 6px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text);
  transition: border-color 0.18s ease, color 0.18s ease;
}
.icon-btn:hover{ border-color: var(--accent); color: var(--accent); }

.hero-stats{
  display: flex; flex-wrap: wrap; gap: 32px;
  padding-top: 26px; border-top: 1px solid var(--border);
}
.hero-stat-value{ font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--accent); }
.hero-stat-label{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.hero-uptime{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 16px; }

/* ---------- about ---------- */

.about-grid{ display: flex; flex-wrap: wrap; gap: 40px; }
.about-text{ flex: 1 1 320px; }
.about-text h2{ font-size: clamp(24px,3vw,32px); margin: 0 0 18px; }
.about-text p{ font-size: 15.5px; line-height: 1.8; color: var(--muted); }

.about-status-card{
  flex: 1 1 280px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  padding: 26px;
  align-self: start;
}
.about-status-card .label{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 10px; }
.about-status-card p{ font-size: 15px; line-height: 1.7; margin: 0; color: var(--text); }

.about-minicards{ display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.about-minicard{ flex: 1 1 240px; border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
.about-minicard .label{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.about-minicard .value{ font-size: 14px; color: var(--text); }

/* ---------- timeline ---------- */

h2.section-title{ font-size: clamp(24px,3vw,32px); margin: 0 0 34px; }

.timeline{
  position: relative; padding-left: 24px;
  border-left: 2px dashed var(--border);
}
.timeline-item{ position: relative; padding-bottom: 40px; }
.timeline-item:last-child{ padding-bottom: 0; }
.timeline-marker{
  position: absolute; left: -32px; top: 4px;
  width: 11px; height: 11px; border-radius: 2px;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-dates{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.timeline-role{ font-size: 18px; margin: 0 0 3px; font-weight: 600; }
.timeline-company{ font-size: 14px; color: var(--accent); margin-bottom: 12px; font-family: var(--font-mono); }
.timeline-bullets{ margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }

/* ---------- skills ---------- */

.skills-grid{ display: flex; flex-wrap: wrap; gap: 20px; }
.skill-card{
  flex: 1 1 280px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  transition: border-color 0.18s ease;
}
.skill-card:hover{ border-color: var(--accent); }
.skill-card-title{ font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.skill-tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag{
  font-size: 12.5px; font-family: var(--font-mono); color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 5px;
}

.proficiency{ margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.proficiency-title{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }
.proficiency-rows{ display: flex; flex-direction: column; gap: 10px; }
.proficiency-row{
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
  font-family: var(--font-mono); font-size: 12.5px;
}
.proficiency-name{ color: var(--text); min-width: 220px; }
.proficiency-bar{ color: var(--accent); }

/* ---------- projects ---------- */

.projects-grid{ display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 22px; }
.project-card{
  flex: 1 1 320px; display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.project-card:hover{
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -12px var(--accent);
}
.project-head{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.project-name{ font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--text); }
.project-git{ font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.project-desc{ font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0 0 14px; }
.project-tags{ display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag{ font-size: 11px; font-family: var(--font-mono); color: var(--muted); background: var(--bg); padding: 3px 8px; border-radius: 4px; }
.project-clone{ margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.highlight-block{
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 24px;
}
.highlight-label{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.highlight-block p{ margin: 0; font-size: 15px; line-height: 1.7; }
.highlight-link{
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.highlight-link:hover{ text-decoration: underline; }

/* ---------- education ---------- */

.degree-card{
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px; margin-bottom: 20px;
}
.degree-card .label{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.degree-name{ font-size: 16px; font-weight: 600; }
.degree-detail{ font-size: 13.5px; color: var(--muted); margin-top: 3px; }

.certs-timeline-label{ font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-bottom: 14px; }

.certs-grid{ display: flex; flex-wrap: wrap; gap: 14px; }
.cert-card{
  flex: 1 1 280px; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px 18px; display: flex; align-items: baseline; gap: 10px;
}
.cert-icon{ color: var(--accent); font-family: var(--font-mono); font-size: 13px; }
.cert-name{ font-size: 14px; font-weight: 600; }
.cert-year{ font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; }

.credly-link{
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
}
.credly-link:hover{ text-decoration: underline; }

/* ---------- contact ---------- */

#contato{ padding: 80px 0 70px; text-align: center; }
.contact-title{ font-size: clamp(26px,4vw,38px); margin: 0 0 14px; }
.contact-subtitle{ font-size: 15px; color: var(--muted); margin: 0 0 30px; }
.contact-ctas{ display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact-ctas .btn{ font-size: 14px; padding: 14px 26px; }

.qr-block{ display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 36px; }
.qr-block img{ border-radius: 8px; border: 1px solid var(--border); }
.qr-caption{ font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

footer{ padding: 30px 0 76px; border-top: 1px solid var(--border); text-align: center; }
.footer-text{ font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- command bar ---------- */

.cmd-bar{
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 8px var(--side-pad);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.cmd-prompt{ font-family: var(--font-mono); font-size: 12px; color: var(--accent); flex-shrink: 0; }
.cmd-input{
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  background: transparent; border: none; outline: none;
  flex: 1 1 auto; min-width: 0;
}
.cmd-input::placeholder{ color: var(--muted); }
.cmd-msg{
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%;
}

/* ---------- responsive ---------- */

@media (max-width: 680px){
  .site-nav{ gap: 14px; }
  .site-nav .nav-label{ display: none; }
}
