/* ==========================================================================
   PORTFÓLIO PRO - GUSTAVO SOBREIRO DE ASSIS (GSA)
   Design System: Obsidian Dark Mode, Glassmorphism & Micro-animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Dynamic Color Tokens - Obsidian / Deep Navy / Emerald Accent */
  --bg-primary: #0A0E17;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(16, 185, 129, 0.3);

  --text-main: #F3F4F6;
  --text-muted: #9CA3AF;
  --text-light: #6B7280;

  --accent-emerald: #10B981;
  --accent-cyan: #06B6D4;
  --accent-blue: #3B82F6;
  --accent-gradient: linear-gradient(135deg, #10B981 0%, #06B6D4 50%, #3B82F6 100%);
  --accent-gradient-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.4) 0%, rgba(6, 182, 212, 0.4) 100%);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'Fira Code', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1240px;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(16, 185, 129, 0.4);

  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #64748B;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Subtle Animated Background Mesh */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: 
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Header Styles */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: padding var(--transition-normal), background var(--transition-normal);
}

.navbar.scrolled {
  padding: 12px 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.logo-badge {
  background: var(--accent-gradient);
  color: #0A0E17;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-emerald);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: #0A0E17;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 160px 0 90px 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 24px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 620px;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.metric-card h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-emerald);
  font-family: var(--font-code);
}

.metric-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Hero Visual / Avatar Card */
.hero-avatar-card {
  padding: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.avatar-wrapper {
  width: 180px;
  height: 180px;
  margin: 0 auto 24px auto;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gradient);
  position: relative;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-secondary);
}

.hero-badge-float {
  position: absolute;
  bottom: 20px;
  right: 10px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.social-icon:hover {
  transform: translateY(-3px);
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* About Section */
.about {
  padding: 90px 0;
}

.about-card {
  padding: 40px;
}

.about-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.about-content p strong {
  color: var(--text-main);
}

/* Tech Stack Section */
.skills {
  padding: 90px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.skill-category-card {
  padding: 32px;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.category-title svg {
  color: var(--accent-emerald);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-weight: 600;
  font-size: 0.98rem;

}

.skill-level {
  font-size: 0.78rem;
  font-family: var(--font-code);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.skill-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Projects Showcase */
.projects {
  padding: 90px 0;
}

.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  color: #0A0E17;
  background: var(--accent-gradient);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.project-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.project-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 12px;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  font-family: var(--font-code);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text-muted);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-emerald);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.btn-link:hover {
  gap: 10px;
}

/* Experience Timeline */
.experience {
  padding: 90px 0;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 40px;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.timeline-card {
  padding: 28px;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-role {
  font-size: 1.2rem;
  font-weight: 700;
}

.timeline-company {
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.95rem;
}

.timeline-period {
  font-family: var(--font-code);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.timeline-type {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

.timeline-body {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Education Section */
.education {
  padding: 90px 0;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.education-card {
  padding: 28px;
}

.edu-degree {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.edu-inst {
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.edu-desc {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* Contact Section */
.contact {
  padding: 90px 0;
}

.contact-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px;
  text-align: center;
}

.contact-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.contact-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 100%;
  max-width: 700px;
  padding: 36px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.modal-close:hover {
  color: var(--accent-emerald);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .education-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.5rem; }
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .contact-card { padding: 28px; }
}
