/* =========================================================
   Eduardo Alexandre — Personal Site 2026
   ========================================================= */

:root {
  --bg: #0b0d12;
  --bg-alt: #10131a;
  --surface: #161a23;
  --surface-2: #1d222d;
  --border: #262c38;
  --text: #eef1f6;
  --text-muted: #9aa3b2;
  --accent: #6ee7b7;
  --accent-2: #7c9bff;
  --gradient: linear-gradient(120deg, #6ee7b7, #7c9bff);
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 16px;
  --shadow: 0 20px 40px -20px rgba(0,0,0,.5);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

#top-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient);
  z-index: 2000;
  transition: width .1s linear;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11,13,18,0);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  background: rgba(11,13,18,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.02em;
}
.brand span { color: var(--accent); }

.nav-menu { display: flex; gap: 28px; }
.menuItem {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s ease;
}
.menuItem:hover, .menuItem.active { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: 60%;
  background-position: center;
  filter: grayscale(60%) brightness(.5);
  opacity: 0;
  animation: heroFade 48s infinite;
}
.hero-bg--1 { animation-delay: 0s; }
.hero-bg--2 { animation-delay: 6s; }
.hero-bg--3 { animation-delay: 12s; }
.hero-bg--4 { animation-delay: 18s; }
.hero-bg--5 { animation-delay: 24s; }
.hero-bg--6 { animation-delay: 30s; }
.hero-bg--7 { animation-delay: 36s; }
.hero-bg--8 { animation-delay: 42s; }

@keyframes heroFade {
  0%     { opacity: 0; }
  4%     { opacity: 1; }
  10.5%  { opacity: 1; }
  12.5%  { opacity: 0; }
  100%   { opacity: 0; }
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,13,18,.55) 0%, rgba(11,13,18,.85) 60%, var(--bg) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 24px;
}
.hero-eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -.02em;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-content h2 {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--text-muted);
  font-size: clamp(18px, 2.5vw, 24px);
  margin: 0 0 20px;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient);
  color: #08110d;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(110,231,183,.5); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

.scroll-cue {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
  z-index: 2;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

.heading { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 13px;
  margin: 0 0 10px;
}
.heading h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.heading h3 {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

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

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
}
.about-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.about-text h3 { font-family: var(--font-head); font-size: 24px; margin: 0 0 4px; }
.about-text h4 { color: var(--accent); font-weight: 500; margin: 0 0 16px; }
.about-text p { color: var(--text-muted); }

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
}
.skills-intro p { color: var(--text-muted); }
.skillbar { margin-bottom: 22px; }
.skillbar-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}
.skillbar-num { color: var(--accent); font-weight: 600; }
.skillbar-track {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.skillbar-fill {
  height: 100%;
  width: 0;
  background: var(--gradient);
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(.2,.8,.2,1);
}

/* ---------- Tabs / Timeline ---------- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.tab-btn.active {
  background: var(--gradient);
  color: #08110d;
  border-color: transparent;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding-left: 32px;
  border-left: 2px solid var(--border);
}
.timeline-item { position: relative; padding: 0 0 40px 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  border: 3px solid var(--bg);
}
.timeline-date {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.timeline-content h4 { font-family: var(--font-head); font-size: 18px; margin: 0 0 2px; }
.timeline-content h5 { color: var(--text-muted); font-weight: 500; font-size: 14px; margin: 0 0 10px; }
.timeline-content p { color: var(--text-muted); font-size: 15px; margin: 0; }
.timeline-item.hidden-extra { display: none; }
.timeline-more-wrap { text-align: center; margin-top: 32px; }

/* ---------- Current Projects ---------- */
.current-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.current-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.current-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.current-card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.current-card-media img { width: 100%; height: 100%; object-fit: cover; }
/* Screenshots mais quadrados: mantém o topo visível ao recortar em 16:9 */
.current-card-media--top img { object-position: center top; }
.current-card-body { padding: 28px; }
.current-card-top { margin-bottom: 12px; }
.current-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(110,231,183,.1);
  padding: 4px 12px;
  border-radius: 999px;
}
.current-card h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 10px; }
.current-card p { color: var(--text-muted); font-size: 14.5px; margin: 0 0 16px; }
.current-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.current-tags span {
  font-size: 12px;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 999px;
}
.current-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Portfolio ---------- */
.portfolioFilter {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.portfolioFilter button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.portfolioFilter button.current { background: var(--gradient); color: #08110d; border-color: transparent; }

.portfolioContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.portfolio-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.portfolio-item.hidden-extra { display: none; }
.portfolio-item.filtered-out { display: none; }
.portfolio-item a { position: relative; display: block; }
.portfolio-item img { width: 100%; height: 160px; object-fit: cover; transition: transform .3s ease; }
.portfolio-item a:hover img { transform: scale(1.06); }
.portfolio-hover {
  position: absolute; inset: 0;
  background: rgba(11,13,18,.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .25s ease;
  text-align: center;
  padding: 12px;
}
.portfolio-item a:hover .portfolio-hover { opacity: 1; }

.portfolio-more-wrap { text-align: center; margin-top: 40px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--accent); }
.contact-card i { margin-bottom: 12px; }
.contact-card span { display: block; font-weight: 600; font-size: 14px; }
.contact-card-static:hover { transform: none; border-color: var(--border); color: inherit; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  position: relative;
}
.social-list { display: flex; justify-content: center; gap: 24px; margin-bottom: 40px; }
.social-list a { color: var(--text-muted); transition: color .2s ease; }
.social-list a:hover { color: var(--accent); }

.certifications {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  opacity: .85;
}
.certifications img {
  height: 56px;
  width: auto;
  filter: grayscale(30%);
  transition: filter .2s ease, transform .2s ease;
}
.certifications img:hover { filter: none; transform: translateY(-2px); }

.footer-copy { text-align: center; color: var(--text-muted); font-size: 13px; margin: 0; }

.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px -6px rgba(37,211,102,.6);
  z-index: 900;
  transition: transform .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

.gototop {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 900;
}
.gototop.visible { opacity: 1; pointer-events: auto; }
.gototop:hover { transform: translateY(-3px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .skills-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 240px; margin: 0 auto; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 64px; right: 0;
    height: calc(100vh - 64px);
    width: min(280px, 80vw);
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 32px 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform .25s ease;
  }
  .nav-menu.open { transform: translateX(0); }
  .section { padding: 72px 0; }
  .timeline { padding-left: 24px; }
  .whatsapp-float { width: 48px; height: 48px; }
}
