:root {
  --primary: #6c63ff;
  --secondary: #ff6584;
  --accent: #43e97b;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --card: #0f3460;
  --text: #e0e0e0;
  --text-muted: #a0a0b0;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #6c63ff 0%, #ff6584 100%);
  --gradient2: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.7;
}

/* NAVBAR */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(108, 99, 255, 0.2);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(108, 99, 255, 0.2);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* PAGE WRAPPER */
.page {
  display: none;
  min-height: 100vh;
  padding-top: 64px;
}

.page.active {
  display: block;
}

/* HERO */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px rgba(108,99,255,0.4);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.hero-desc {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.tag {
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--primary);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,99,255,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.15);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* SECTIONS */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
}

.section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.card {
  background: rgba(15, 52, 96, 0.5);
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(108, 99, 255, 0.4);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-badge {
  display: inline-block;
  background: rgba(67, 233, 123, 0.15);
  border: 1px solid rgba(67, 233, 123, 0.3);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-badge.red {
  background: rgba(255, 101, 132, 0.15);
  border-color: rgba(255, 101, 132, 0.3);
  color: var(--secondary);
}

.card-badge.purple {
  background: rgba(108, 99, 255, 0.15);
  border-color: rgba(108, 99, 255, 0.3);
  color: var(--primary);
}

.card h3 {
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.card-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.skill-chip {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.15rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--dark);
  box-shadow: 0 0 10px rgba(108,99,255,0.6);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.timeline-item .company {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.timeline-item ul {
  list-style: none;
  padding: 0;
}

.timeline-item ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.2rem 0;
  padding-left: 1rem;
  position: relative;
}

.timeline-item ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: rgba(15, 52, 96, 0.5);
  border: 1px solid rgba(108, 99, 255, 0.15);
  border-radius: 16px;
  padding: 1.5rem;
}

.skill-category h3 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 0.35rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.skill-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* POMPIER */
.pompier-hero {
  background: linear-gradient(135deg, rgba(255,60,60,0.15) 0%, rgba(255,150,0,0.1) 100%);
  border: 1px solid rgba(255,60,60,0.2);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.pompier-hero .big-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.pompier-hero h2 {
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.pompier-hero p {
  color: var(--text-muted);
}

/* CONTACT */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 52, 96, 0.5);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.25s;
  font-weight: 500;
}

.contact-link:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108,99,255,0.2);
}

.contact-link .icon {
  font-size: 1.5rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.35s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.5s; opacity: 0; }

/* CATEGORY HEADER */
.project-category-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.category-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.inline-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.inline-link:hover {
  text-decoration: underline;
}

/* GITHUB LINK in sidebar */
.github-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.github-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* CATEGORY LABEL */
.category-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.2rem;
}

/* CARD CLICKABLE */
.card-clickable {
  cursor: pointer;
}

.card-cta {
  margin-top: 1.2rem;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s;
}

.card-clickable:hover .card-cta {
  opacity: 1;
  transform: translateX(0);
}

/* PROJECT DETAIL */
.back-btn {
  margin-bottom: 2rem;
}

.project-detail-header {
  margin-bottom: 3rem;
}

.project-detail-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  margin: 0.5rem 0;
}

.project-detail-subtitle {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.detail-section {
  margin-bottom: 2.5rem;
}

.detail-section h2 {
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(108,99,255,0.2);
}

.detail-section p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

.detail-section strong {
  color: var(--text);
}

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.detail-list li {
  color: var(--text-muted);
  padding: 0.35rem 0 0.35rem 1.2rem;
  position: relative;
  line-height: 1.7;
}

.detail-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.result-box {
  background: rgba(67, 233, 123, 0.08);
  border: 1px solid rgba(67, 233, 123, 0.25);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.result-box p {
  color: var(--text);
  margin: 0;
}

.soft-skills-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.soft-skill-item {
  background: rgba(15, 52, 96, 0.4);
  border: 1px solid rgba(108,99,255,0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.soft-skill-item strong {
  color: var(--white);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.soft-skill-item p {
  margin: 0;
  font-size: 0.88rem;
}

/* SIDEBAR */
.sidebar-card {
  background: rgba(15, 52, 96, 0.5);
  border: 1px solid rgba(108,99,255,0.15);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sidebar-card h3 {
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.88rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span:first-child {
  color: var(--text-muted);
}

.info-row span:last-child {
  color: var(--text);
  font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--dark2);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid rgba(108,99,255,0.2);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
  }
}
