/* ==========================================================================
   Jose Augusto Schiavoni - Portfolio
   ========================================================================== */

:root {
  --bg: #0b0f1a;
  --bg-dark: #070a12;
  --bg-card: #111827;
  --bg-elevated: #1a2332;
  --primary: #38bdf8;
  --primary-dim: #0ea5e9;
  --accent: #818cf8;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #1f2937;
  --success: #34d399;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, #0b0f1a 0%, #0e1a2b 50%, #101c33 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(129, 140, 248, 0.08), transparent);
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.25;
  animation: float linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.25rem;
}

.hero-typewriter {
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  min-height: 2.2rem;
  margin-bottom: 1.25rem;
}

.cursor {
  color: var(--primary);
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-location {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #0b0f1a;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dim);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(56, 189, 248, 0.45);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #0b0f1a;
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-muted);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 4px;
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: 6rem 5%;
}

.section-dark {
  background: var(--bg-dark);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ==========================================================================
   About
   ========================================================================== */

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

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

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: 2px;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   Skills
   ========================================================================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.12);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.skill-tags span {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.skill-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s ease;
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.timeline-header h3 {
  font-size: 1.15rem;
}

.timeline-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

.timeline-badge.current {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.timeline-company {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-tags span {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.15);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border);
  padding: 1.75rem 5%;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   Scroll reveal animations
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate="fade-up"].visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-right"].visible {
  opacity: 1;
  transform: translateX(0);
}

[data-animate="fade-right"] {
  transform: translateX(-30px);
}

[data-animate="fade-left"].visible {
  opacity: 1;
  transform: translateX(0);
}

[data-animate="fade-left"] {
  transform: translateX(30px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .about-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    gap: 1.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 240px;
  }

  .section {
    padding: 4rem 1.5rem;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}