:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --accent-color: #38bdf8;
  /* Light Blue */
  --accent-secondary: #F79F39;
  /* Orange/Gold */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-hover: rgba(56, 189, 248, 0.1);
  --sidebar-bg: rgba(15, 23, 42, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    radial-gradient(circle at var(--g1-x) var(--g1-y), rgba(56, 189, 248, 0.3) 0%, transparent 50%),
    radial-gradient(circle at var(--g2-x) var(--g2-y), rgba(251, 191, 36, 0.3) 0%, transparent 30%);

  animation: bg-pulse 30s infinite ease-in-out;
  opacity: 0;
}

@keyframes bg-pulse {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }

  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.icon img {
  width: 100%;
  height: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Grid Layout */
.resume-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  align-items: start;
  grid-template-areas: 
  "main-header main-header"
  "sidebar content";
}

.main-header { grid-area: main-header; }
.sidebar { grid-area: sidebar; }
.main    { grid-area: main-content; }

@media (max-width: 768px) {
  .resume-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
    "main-header"
    "content"
    "sidebar";
  }

  .main-header {
    justify-items: center;
  }

  .main-header h1,
  .main-header h2 {
    text-align: center;
  }
}

.glow {
  /* Variáveis padrão caso o JS demore a carregar */
  --mouse-x: -1000px;
  --mouse-y: -1000px;
  --glow-opacity: 0;
  --glow-color: var(--accent-secondary);
  --border-color: var(--accent-color);

  /* Transição suave da opacidade quando o mouse entra/sai */
  transition: --glow-opacity 0.3s ease;
  position: relative;
}

/* Inverte a cor do brilho e da borda */
.reverse-glow {
  --glow-color: var(--accent-color);
  --border-color: var(--accent-secondary);
}

/* SUPERFÍCIE (Brilho interno) */
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  /* Herda o arredondamento da section */
  pointer-events: none;
  z-index: -2;
  /* Fica acima do background, mas abaixo do texto se o texto tiver z-index maior ou position relative */

  /* O gradiente segue o mouse */
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y),
      rgba(56, 189, 248, 0.15),
      transparent 40%);
  border: 1px solid var(--border-color);

  opacity: var(--glow-opacity);
  transition: opacity 0.3s;
}

/* BORDA (O brilho no contorno) */
.glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  /* Fica acima do brilho interno */
  z-index: 3;
  padding: 1px;

  /* O gradiente da borda */
  background: radial-gradient(400px circle at var(--mouse-x) var(--mouse-y),
      var(--glow-color),
      transparent 40%);

  /* A MÁGICA PARA RESPEITAR O BORDER-RADIUS: */
  /* Cria uma máscara que cobre tudo, exceto a área de conteúdo (content-box) */
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  /* Para Webkit (Chrome, Safari) */
  -webkit-mask-composite: xor;
  /* Padrão (Firefox) */
  mask-composite: exclude;

  opacity: var(--glow-opacity);
  transition: opacity 0.3s;
}

/* Main Header */
.main-header {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  text-align: left;
  border-left: 4px solid var(--accent-secondary);

  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
}

.main-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.main-header h2 {
  font-size: 1.2rem;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 14.5rem;
  height: 14.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  border: 1px solid var(--glass-border);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* Sidebar */
.sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  height: fit-content;
}


.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  font-size: 1.2rem;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(56, 189, 248, 0.05);
  color: var(--text-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.skill-tag:hover {
  background: rgba(56, 189, 248, 0.1);
  /* border-color: var(--accent-color); */
}


.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-level-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.skill-level-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-color));
  width: var(--level, 0%);
  border-radius: 2px;
}

.simple-list {
  list-style: none;
}

.simple-list li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  margin-bottom: 0.5rem;
}

.profile-link:hover {
  color: var(--accent-secondary);
}

/** Main Content **/
.main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}


.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.contact-item .material-icons {
  font-size: 1.2rem;
  color: var(--accent-color);
}

section {
  background: var(--glass-bg);
  /* backdrop-filter: blur(10px); */
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

/* Timeline */
.timeline-item {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent-secondary);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline-detail {
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* Badges Grid */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--glass-border);
  transition: background 0.3s ease;
  width: 100%;
}

.badge:hover {
  background: var(--card-hover);
  border-color: var(--accent-secondary);
}

.badge img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.badge-title {
  font-size: 1rem;
  font-weight: bold;
  color: var(--text-color);
}

.badge-issuer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.badge-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Project Cards */
.project-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--accent-color), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover::after {
  transform: scaleX(1);
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-card h4 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.project-card .project-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar,
.main-header,
section {
  animation: fadeIn 0.8s ease-out forwards;
}

.sidebar {
  animation-delay: 0.1s;
}

.main-header {
  animation-delay: 0.2s;
}

section:nth-of-type(1) {
  animation-delay: 0.3s;
}

section:nth-of-type(2) {
  animation-delay: 0.4s;
}

section:nth-of-type(3) {
  animation-delay: 0.5s;
}

section:nth-of-type(4) {
  animation-delay: 0.6s;
}

section:nth-of-type(5) {
  animation-delay: 0.7s;
}