@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;700;900&family=Roboto+Mono&display=swap");

/* --- THEME VARIABLES --- */
:root {
  /* --- TEMA ESCURO: PRETO FOSCO (Matte Black) --- */
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --card-color: #1e1e1e;
  --border-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.8);

  --primary-gradient: linear-gradient(45deg, #8e2de2, #4a00e0);
  --primary-color: #8e2de2;
  --secondary-color: #4a00e0;

  /* Light Theme */
  --bg-color-light: #f8f9fa;
  --text-color-light: #212529;
  --card-color-light: #ffffff;
  --border-color-light: #dee2e6;
  --shadow-color-light: rgba(106, 13, 173, 0.4);

  --primary-gradient-light: linear-gradient(45deg, #6a0dad, #00008b);
  --primary-color-light: #6a0dad;
  --secondary-color-light: #00008b;

  --font-main: "Roboto", sans-serif;
  --font-mono: "Roboto Mono", monospace;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes gradientRotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- BASE STYLES --- */
html {
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding-top: 70px;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

body.light-mode {
  --bg-color: var(--bg-color-light);
  --text-color: var(--text-color-light);
  --card-color: var(--card-color-light);
  --border-color: var(--border-color-light);
  --shadow-color: var(--shadow-color-light);
  --primary-gradient: var(--primary-gradient-light);
  --primary-color: var(--primary-color-light);
  --secondary-color: var(--secondary-color-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

/* --- ACESSIBILIDADE (FOCUS RING) --- */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- SEPARAÇÃO DE SEÇÕES E ANIMAÇÃO --- */
section {
  padding: 100px 0;
  position: relative;
}

section:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color),
    transparent
  );
  opacity: 0.3;
}

section:last-of-type::after {
  display: none;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
}
.section-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- NAVBAR --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

body.light-mode nav {
  background-color: rgba(248, 249, 250, 0.85);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    #00e676,
    var(--secondary-color),
    #ff0055
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientRotate 4s linear infinite;
}

.nav-links {
  display: flex;
  gap: 15px;
}

.nav-link {
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* Link ativo (JS) */
.nav-link.active-link {
  color: var(--primary-color);
  font-weight: bold;
}
.nav-link.active-link::before {
  width: 100%;
}

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

/* --- CUSTOM LANGUAGE SWITCHER --- */
.lang-switcher {
  position: relative;
}

.lang-btn {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.3s, color 0.3s;
}

.lang-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.lang-btn i {
  transition: transform 0.3s ease;
}

.lang-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px;
  margin: 0;
  display: none;
  flex-direction: column;
  gap: 5px;
  min-width: 80px;
  z-index: 1001;
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 4px;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

.lang-option:hover {
  background: var(--primary-gradient);
  color: white;
}

/* --- THEME TOGGLE SLIDER --- */
.theme-toggle {
  display: inline-block;
  height: 32px;
  width: 80px;
  position: relative;
  cursor: pointer;
}

.theme-toggle input {
  display: none;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  transition: all 0.4s ease;
}

.slider::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f185";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 2px;
  top: 2px;

  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--secondary-color);

  border-radius: 50%;
  transition: all 0.4s ease;
  z-index: 1;

  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}

.theme-toggle input:checked + .slider::before {
  content: "\f186";
  color: var(--primary-color);
  transform: translateX(48px);
}

/* --- HERO SECTION --- */
#about.hero {
  padding-top: 100px;
  padding-bottom: 100px;
  overflow: hidden;
}

/* Glow Effect */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(142, 45, 226, 0.15) 0%,
    rgba(0, 0, 0, 0) 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Badge Neon */
.badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 1.5rem;

  border: 1px solid #00e676;
  background-color: rgba(0, 230, 118, 0.15);
  color: #00e676;
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
  transition: transform 0.3s ease;
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 230, 118, 0.4);
}

.about-text h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-text h1 span {
  font-weight: 900;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    #00e676,
    var(--secondary-color),
    #ff0055
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientRotate 4s linear infinite;
}

.about-text h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.bio-text {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.stats {
  display: flex;
  gap: 30px;
  margin: 30px 0;
}
.stat {
  text-align: center;
}
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  display: block;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* --- FOTO DE PERFIL ANIMADA --- */

.about-image .profile-pic {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  box-shadow: 0 0 40px var(--shadow-color);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.5s ease;
}

.about-image .profile-pic::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -7px;
  left: -7px;
  right: -7px;
  bottom: -7px;
  border-radius: 50%;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  transition: all 0.5s ease;
}

.about-image .profile-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-image .profile-pic:hover img {
  transform: scale(1.12);
}

.about-image .profile-pic:hover::before {
  background: linear-gradient(
    45deg,
    var(--primary-color),
    #00e676,
    var(--secondary-color),
    #ff0055
  );
  background-size: 300% 300%;
  animation: gradientRotate 2s linear infinite;
  transform: scale(1.12);
}

.about-image .profile-pic:hover {
  box-shadow: 0 0 60px rgba(142, 45, 226, 0.8);
}

/* --- BUTTONS --- */
.btn-group {
  margin-top: 35px;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.btn {
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  font-size: 0.95rem;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 6px 0 #3b00b3,
    0 12px 10px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 8px 0 #3b00b3,
    0 15px 20px rgba(142, 45, 226, 0.4);
}

.btn-primary:active {
  transform: translateY(6px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 0 0 #3b00b3,
    0 2px 5px rgba(0, 0, 0, 0.4);
}

.btn-outline {
  background-color: var(--card-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 0 #2a0a4a,
    0 12px 10px rgba(0, 0, 0, 0.4);
}

.btn-outline:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 8px 0 #3b00b3,
    0 15px 20px rgba(0, 0, 0, 0.5);
}

.btn-outline:active {
  transform: translateY(6px);
  border-color: transparent;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.1), 0 0 0 #3b00b3,
    0 2px 5px rgba(0, 0, 0, 0.4);
}

.btn-center {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}

.btn i {
  font-size: 1.1rem;
}

/* --- SKILLS --- */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.category-title {
  font-size: 1.2rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}
.category-title i {
  margin-right: 10px;
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-tag {
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.skill-tag:hover {
  transform: scale(1.1);
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
}

/* --- EDUCATION --- */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.education-item {
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-color);
  border-radius: 8px;
  padding: 35px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.education-item:hover {
  transform: translateX(10px);
  box-shadow: 0 10px 25px var(--shadow-color);
  border-color: var(--primary-color);
}

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

.education-degree {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  flex: 1;
}

.education-institution {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.education-period {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--text-color);
  opacity: 0.8;
  white-space: nowrap;
}

.education-desc {
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.8;
  font-size: 1rem;
  text-align: justify;
}

/* --- TIMELINE --- */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 4px;
  background: var(--primary-gradient);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  box-shadow: 0 0 15px var(--primary-color);
  border-radius: 2px;
}
.timeline-item {
  padding: 10px 50px;
  position: relative;
  background-color: inherit;
  width: 50%;
  box-sizing: border-box;
}
.timeline-item.left {
  left: 0;
}
.timeline-item.right {
  left: 50%;
}
.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--bg-color);
  border: 3px solid var(--primary-color);
  top: 32px;
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 0 10px var(--primary-color);
  transition: all 0.3s ease;
}
.timeline-item.right .timeline-dot {
  left: -10px;
}

.timeline-card {
  padding: 30px;
  background-color: var(--card-color);
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}
.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-color);
  border-color: var(--primary-color);
}
.timeline-card .role {
  font-size: 1.3rem;
  color: var(--text-color);
  margin-bottom: 5px;
  font-weight: 700;
}
.timeline-card .company {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 500;
  display: block;
  margin-bottom: 15px;
}
.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 4px 12px;
  background: rgba(142, 45, 226, 0.15);
  color: var(--primary-color);
  border-radius: 20px;
  border: 1px solid rgba(142, 45, 226, 0.3);
  margin-bottom: 15px;
}
.timeline-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.8;
}
.timeline-card::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 32px;
  width: 0;
  z-index: 1;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--card-color) transparent transparent;
}
.timeline-item.left .timeline-card::before {
  right: -10px;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent var(--card-color);
}
.timeline-item.right .timeline-card::before {
  left: -10px;
  border-width: 10px 10px 10px 0;
  border-color: transparent var(--card-color) transparent transparent;
}

/* --- PROJECTS --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

/* Spinner */
.spinner-container {
  text-align: center;
  padding: 40px;
}
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.project-card {
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 12px;
  padding: 30px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px var(--shadow-color);
  border-color: var(--primary-color);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.folder-icon {
  font-size: 2.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 5px rgba(142, 45, 226, 0.5));
}

.project-header a i {
  color: var(--text-color);
  font-size: 1.2rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.project-header a:hover i {
  opacity: 1;
  color: var(--primary-color);
  transform: scale(1.2);
  text-shadow: 0 0 10px var(--primary-color);
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 15px;
  line-height: 1.3;
}

.project-desc {
  color: var(--text-color);
  opacity: 0.75;
  flex-grow: 1;
  margin-bottom: 25px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-techs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
}

/* --- CONTACT --- */
#contact {
  position: relative;
  overflow: hidden;
}

.contact-content {
  background-color: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 50px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  border-bottom: 4px solid var(--primary-color);
}

.contact-text {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: var(--text-color);
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 15px 25px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.contact-item i {
  font-size: 1.2rem;
  color: white;
  background: var(--primary-gradient);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-color);
}

.contact-item span {
  font-size: 1rem;
  font-weight: 500;
}

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

.social-btn {
  width: 55px;
  height: 55px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.social-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.social-btn i {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-5px) scale(1.1);
  border-color: transparent;
  box-shadow: 0 0 20px var(--primary-color);
}

.social-btn:hover::before {
  opacity: 1;
}

.social-btn:hover i {
  color: white;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 5px;
  margin-left: 5px;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.copy-btn:hover {
  color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
  background-color: var(--card-color);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 100px;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color),
    var(--primary-color)
  );
  background-size: 200% 200%;
  animation: gradientRotate 5s linear infinite;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-info {
  text-align: left;
}

.copyright {
  font-size: 1rem;
  opacity: 0.8;
}

.footer-stack {
  display: flex;
  align-items: center;
  gap: 15px;
}

.stack-label {
  font-size: 0.9rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stack-icons {
  display: flex;
  gap: 10px;
}

.tech-icon {
  font-size: 1.5rem;
  color: var(--text-color);
  transition: transform 0.3s ease, color 0.3s ease;
  opacity: 0.6;
}

.tech-icon:hover {
  transform: translateY(-3px) scale(1.1);
  opacity: 1;
}

.tech-icon:nth-child(1):hover {
  color: #e34f26;
}
.tech-icon:nth-child(2):hover {
  color: #1572b6;
}
.tech-icon:nth-child(3):hover {
  color: #f7df1e;
}

/* --- SCROLL-TO-TOP BUTTON --- */
.scroll-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
  transition: all 0.4s ease;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scroll-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .contact-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  /* Timeline Mobile */
  .timeline::after {
    left: 31px;
  }
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }
  .timeline-item.left .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: 21px;
    right: auto;
  }
  .timeline-item.left .timeline-card::before,
  .timeline-item.right .timeline-card::before {
    left: -10px;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--card-color) transparent transparent;
    right: auto;
  }

  .contact-details {
    flex-direction: column;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-info {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 15px;
  }
  .logo {
    font-size: 1.4rem;
  }
  .nav-actions {
    gap: 10px;
  }
  .about-text h1 {
    font-size: 2.2rem;
  }
  .btn-group {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .stats {
    justify-content: center;
    gap: 20px;
  }
  .about-image .profile-pic {
    width: 220px;
    height: 220px;
  }
  .education-header {
    flex-direction: column;
  }
  .education-period {
    align-self: flex-start;
    margin-top: 5px;
  }
  .contact-content {
    padding: 30px 20px;
  }
  .contact-details {
    flex-direction: column;
    gap: 15px;
  }
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 15px;
    width: 100%;
  }
  #contact-email {
    font-size: 0.9rem;
    word-break: break-all;
  }
}
