/* style.css — sóbrio, responsivo e moderno */
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --muted:#6b7280;
  --accent:#0d47a1;
  --accent-2:#1976d2;
  --yellow:#ffca28;
  --glass: rgba(255,255,255,0.6);
  --max-width:1100px;
  --text-primary:#111827;
  --text-secondary:#374151;
  --border-color:rgba(17,24,39,0.06);
  --shadow-light:rgba(15,23,42,0.06);
  --shadow-medium:rgba(15,23,42,0.15);
}

/* Dark    */
[data-theme="dark"] {
  --bg:#0f172a;
  --card:#1e293b;
  --muted:#94a3b8;
  --text-primary:#f1f5f9;
  --text-secondary:#cbd5e1;
  --border-color:rgba(255,255,255,0.1);
  --shadow-light:rgba(0,0,0,0.3);
  --shadow-medium:rgba(0,0,0,0.4);
  --glass: rgba(30,41,59,0.8);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--card);
  color: var(--text-primary);
  box-shadow: 0 4px 12px var(--shadow-light);
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--shadow-medium);
}

.theme-toggle i {
  display: block;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--yellow));
  z-index: 1000;
  transition: width 0.1s ease;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial;
  margin:0;
  background:linear-gradient(180deg,var(--bg),var(--card));
  color:var(--text-primary);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

/* layout */
.container{
  width:90%;
  max-width:var(--max-width);
  margin:0 auto;
}

/* Hero */
.hero{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:white;
  padding:4rem 0;
}
.hero-inner{
  display:flex;
  gap:2rem;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.hero-left{flex:1 1 420px}
.hero-right{flex:0 0 260px;display:flex;justify-content:center}
.name{color:var(--yellow);font-weight:700}
.lead{color:rgba(255,255,255,0.9);max-width:56ch}
.hero-cta{margin-top:1.25rem;display:flex;gap:.75rem;flex-wrap:wrap}
.btn{
  display:inline-block;padding:.6rem .9rem;border-radius:8px;background:white;color:var(--accent);text-decoration:none;font-weight:600;box-shadow:0 2px 8px rgba(13,71,161,0.12);
}
.btn:hover{transform:translateY(-2px)}
.btn-outline{background:transparent;border:1px solid rgba(255,255,255,0.16);color:white}
.btn-email{background:rgba(255,255,255,0.12);color:white}

/* Avatar animations and effects */
.avatar {
  transition: transform 0.3s ease, filter 0.3s ease;
}
.avatar:hover {
  transform: scale(1.05) rotate(2deg);
  filter: drop-shadow(0 10px 20px rgba(13, 71, 161, 0.3));
}
.avatar svg {
  transition: all 0.3s ease;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation for page */
.loading {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button hover effects */
.btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Card hover animations */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(15,23,42,0.15);
}

/* Badge hover effects */
.badge {
  transition: all 0.2s ease;
}

.badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13,71,161,0.2);
}

/* small social */
.social.small{margin-top:1rem}
.social.small a{color:rgba(255,255,255,0.9);margin-right:.65rem;font-size:1.15rem}

/* sections */
main{padding:2.25rem 0 4rem}
section{padding:2.25rem 0}
h3{font-size:1.25rem;margin:0 0 .6rem;color:var(--text-primary)}
p{margin:0 0 1rem;color:var(--muted)}
.badges{display:flex;flex-wrap:wrap;gap:.5rem}
.badge{background:var(--card);padding:.45rem .7rem;border-radius:999px;border:1px solid var(--border-color);font-weight:600;color:var(--text-primary);box-shadow:0 1px 4px var(--shadow-light)}

/* projects */
.projects {
  overflow: hidden;
  position: relative;
}

.grid {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  animation: none; /* remove animação infinita */
}

.card {
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px var(--shadow-light);
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Larguras responsivas dos cards */
@media (min-width: 1400px) {
  .card { min-width: calc(25% - 0.75rem); max-width: calc(25% - 0.75rem); }
}
@media (min-width: 1025px) and (max-width: 1399px) {
  .card { min-width: calc(33.333% - 0.67rem); max-width: calc(33.333% - 0.67rem); }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .card { min-width: calc(50% - 0.5rem); max-width: calc(50% - 0.5rem); }
}
@media (max-width: 768px) {
  .grid { display: grid; grid-template-columns: 1fr; overflow-x: visible; }
  .card { min-width: 100%; max-width: 100%; }
}

/* contact */
.contact-row{display:flex;gap:2rem;align-items:flex-start;flex-wrap:wrap}
.contact-form{background:var(--card);padding:1rem;border-radius:10px;box-shadow:0 6px 18px var(--shadow-light);min-width:280px;flex:1}
.contact-form input,.contact-form textarea{width:100%;padding:.6rem;border-radius:8px;border:1px solid var(--border-color);margin-bottom:.6rem;background:var(--card);color:var(--text-primary)}
.hint{color:var(--muted);font-size:.875rem}

/* footer */
.site-footer{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:white;padding:1.25rem 0;margin-top:2rem}
.footer-links a{color:rgba(255,255,255,0.9);text-decoration:none}

/* responsive */
@media (max-width:720px){
  .hero-inner{gap:1rem}
  .hero-right{order:3;margin-top:1rem}
  .hero-left{flex:1 1 100%}
}
.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}
