:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --purple: #8b5cf6;
  --purple-light: #a78bfa;
  --orange: #f97316;
  --orange-light: #fb923c;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --card-bg: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    #7c2d12 50%,
    var(--bg-primary) 100%
  );
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 2rem;
}

.hero-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--purple);
  top: 10%;
  left: 10%;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--orange);
  bottom: 10%;
  right: 10%;
  animation-delay: 2s;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.avatar {
  margin: 0 auto 2rem;
  width: 160px;
  height: 160px;
  max-width: 160px;
  max-height: 160px;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  border-radius: 50%;
  padding: 5px;
  animation: float 3s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3),
    0 8px 32px rgba(249, 115, 22, 0.2);
  overflow: hidden;
}

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

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
  display: block;
  transition: transform 0.3s ease;
  border: 3px solid var(--bg-primary);
}

.avatar-image:hover {
  transform: scale(1.05);
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  background: linear-gradient(
    135deg,
    var(--purple),
    var(--orange),
    var(--purple)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 3s ease infinite;
}

@keyframes gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-description-2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.social-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
  border-color: var(--orange);
}

.scroll-indicator {
  animation: bounce 2s infinite;
  color: var(--orange);
}

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

/* Sections */
.section {
  padding: 6rem 2rem;
}

.section-alt {
  background: rgba(0, 0, 0, 0.2);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title svg {
  color: var(--orange);
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--border);
}

.text-lg {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.text-lg:last-child {
  margin-bottom: 0;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--purple), var(--orange));
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -3.5rem;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  background: var(--orange);
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--orange);
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-company {
  color: var(--orange);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.timeline-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.experience-list {
  list-style: none;
  padding: 0;
}

.experience-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.experience-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 1.2rem;
}

/* Skills */
.skills-category {
  margin-bottom: 3rem;
}

.skills-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--orange-light);
}

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

.skills-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.skill-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.skill-card:hover {
  border-color: rgba(249, 115, 22, 0.5);
  transform: translateY(-5px);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

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

.skill-percent {
  color: var(--orange);
  font-weight: 700;
}

.skill-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--orange));
  border-radius: 999px;
  transition: width 1.5s ease-out;
}

.skill-details {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Skills table */
.skills-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.skills-table thead th {
  text-align: left;
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.18),
    rgba(249, 115, 22, 0.14)
  );
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  z-index: 1;
}

.skills-table tbody td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.skills-table thead th:first-child,
.skills-table tbody td:first-child {
  width: 1%;
  white-space: nowrap;
}

.skills-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.skills-table tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.015);
}

.skills-table thead th:first-child {
  border-top-left-radius: 12px;
}
.skills-table thead th:last-child {
  border-top-right-radius: 12px;
}
.skills-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 12px;
}
.skills-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 12px;
}

/* Chips (badges) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.chip.active {
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25) inset;
  border-color: rgba(249, 115, 22, 0.5);
}

.chip-domain {
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.12);
}
.chip-devops {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.12);
}
.chip-dev {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

/* Periodic-style skills grid */
.skills-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.skills-periodic {
  display: grid;
  grid-template-columns: repeat(12, minmax(72px, 1fr));
  grid-auto-rows: 140px;
  gap: 0.9rem;
}

.skill-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  animation: floatY 6s ease-in-out infinite;
}

.skill-cell:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(249, 115, 22, 0.45);
}

.skill-cell .abbr {
  font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.5px;
}

.skill-cell .name {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.skill-cell .icon {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--orange);
  opacity: 0.85;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Staggered animation delays */
.skills-periodic .skill-cell:nth-child(3n + 1) {
  animation-delay: 0s;
}
.skills-periodic .skill-cell:nth-child(3n + 2) {
  animation-delay: 0.8s;
}
.skills-periodic .skill-cell:nth-child(3n) {
  animation-delay: 1.6s;
}

/* Category accents */
.cat-cloud {
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.15),
    rgba(255, 255, 255, 0.02)
  );
}
.cat-devops {
  background: linear-gradient(
    180deg,
    rgba(249, 115, 22, 0.15),
    rgba(255, 255, 255, 0.02)
  );
}
.cat-dev {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.02)
  );
}

/* Tooltip using data-details */
.skill-cell::after {
  content: attr(data-details);
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.skill-cell:hover::after {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .skills-periodic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .skills-periodic .skill-cell {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .skill-cell {
    aspect-ratio: auto;
    min-height: 120px;
  }
  .skill-cell::after {
    opacity: 1;
    transform: none;
    position: static;
    margin-top: 0.4rem;
    background: rgba(255, 255, 255, 0.06);
  }
}
@media (max-width: 768px) {
  .skills-table thead {
    display: none;
  }
  .skills-table,
  .skills-table tbody,
  .skills-table tr,
  .skills-table td {
    display: block;
    width: 100%;
  }
  .skills-table tbody tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
  }
  .skills-table tbody td {
    border-bottom: 1px solid var(--border);
  }
  .skills-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
  }
  .skills-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
  }
}

/* Education */
.education-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.education-card {
  text-align: center;
  padding: 2.5rem;
}

.education-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--purple), var(--orange));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.education-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.education-school {
  color: var(--orange);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.education-speciality {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.education-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
}

/* Contact */
.text-center {
  text-align: center;
}

.contact-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--orange));
  color: white;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--orange);
}

/* Footer */
footer {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

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

  .section {
    padding: 4rem 1rem;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-marker {
    left: -2.4rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* Animations supplémentaires */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease-out;
}

.timeline-item {
  animation: fadeInUp 0.6s ease-out;
}

.timeline-item:nth-child(2) {
  animation-delay: 0.1s;
}

.timeline-item:nth-child(3) {
  animation-delay: 0.2s;
}
