/* Reset and base styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

:root {
  --bg: #f8f9fa;
  --bg-alt: #ffffff;
  --text: #111827;
  --muted: #4b5563;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --container: 1100px;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(circle at 15% 50%, rgba(236, 72, 153, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%),
    var(--bg);
  line-height: 1.6;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 15px;
}

.header-branding {
  display: flex;
  flex-direction: column;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text) 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Navigation */
.main-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

.main-nav a.active {
  color: var(--primary-strong);
  font-weight: 600;
}

/* Responsive Header */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Scrollbar spacing */
  }

  .main-nav ul {
    gap: 15px;
    white-space: nowrap;
  }
}

/* Hero Section */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15), transparent 50%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }

  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  background: var(--card);
  border-radius: 24px;
  padding: 60px 50px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--border);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
  backdrop-filter: blur(10px);
}

.hero-text {
  text-align: center;
}

.hero-name-large {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 30%, #10b981 70%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  text-align: center;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0 0 20px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--text);
  font-weight: 600;
  line-height: 1.6;
  margin: 0 auto 50px;
  max-width: 800px;
  font-style: italic;
  padding: 20px 30px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
  border-left: 4px solid #3b82f6;
  border-radius: 12px;
  text-align: center;
}

.hero-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 50px 0;
  text-align: left;
}

.hero-section-block {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(16, 185, 129, 0.05));
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.15);
  transition: all 0.3s ease;
}

.hero-section-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.hero-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-section-block p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.hero-tech {
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tech-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-strong);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-cta {
  margin-top: 30px;
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
  padding: 36px 0 64px;
}

.project-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #c7d2fe;
}

.project-card:hover::before {
  opacity: 1;
}

.project-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.project-meta {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.project-meta li+li {
  margin-top: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  padding: 26px 0;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Buttons, tags, utilities */
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tag:hover {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: 40px 0;
    margin: 20px 0;
  }

  .hero-content {
    padding: 40px 25px;
    border-radius: 16px;
  }

  .hero-name-large {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: -1px;
  }

  .hero-sections {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
  }

  .hero-section-block {
    padding: 20px;
  }

  .hero-tech {
    padding: 20px;
  }
}

/* CV Viewer */
.cv-viewer {
  width: 100%;
  margin-top: 20px;
  position: relative;
}

.cv-viewer iframe {
  min-height: 600px;
}

@media (max-width: 768px) {
  .cv-viewer iframe {
    height: 600px;
    min-height: 600px;
  }
}

/* Compétences Page */
.competence-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--primary-strong);
  font-weight: 600;
  margin: 20px 0;
  padding: 15px 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  text-align: center;
}

.competence-content {
  margin-top: 25px;
}

.competence-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(79, 70, 229, 0.2);
}

.competence-content p {
  margin: 0 0 15px;
  line-height: 1.7;
}

@media (min-width: 640px) {
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.hero-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-section-block p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.hero-tech {
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tech-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-strong);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-cta {
  margin-top: 30px;
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
  padding: 36px 0 64px;
}

.project-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #c7d2fe;
}

.project-card:hover::before {
  opacity: 1;
}

.project-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.project-meta {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.project-meta li+li {
  margin-top: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  padding: 26px 0;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Buttons, tags, utilities */
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tag:hover {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: 40px 0;
    margin: 20px 0;
  }

  .hero-content {
    padding: 40px 25px;
    border-radius: 16px;
  }

  .hero-name-large {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: -1px;
  }

  .hero-sections {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
  }

  .hero-section-block {
    padding: 20px;
  }

  .hero-tech {
    padding: 20px;
  }
}

/* CV Viewer */
.cv-viewer {
  width: 100%;
  margin-top: 20px;
  position: relative;
}

.cv-viewer iframe {
  min-height: 600px;
}

@media (max-width: 768px) {
  .cv-viewer iframe {
    height: 600px;
    min-height: 600px;
  }
}

@media (min-width: 640px) {
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.hero-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-section-block p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.hero-tech {
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tech-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-strong);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-cta {
  margin-top: 30px;
  font-size: 1.1rem;
  color: var(--muted);
  font-weight: 500;
}

/* Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
  padding: 36px 0 64px;
}

.project-card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #c7d2fe;
}

.project-card:hover::before {
  opacity: 1;
}

.project-title {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.project-meta {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.project-meta li+li {
  margin-top: 6px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  padding: 26px 0;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

/* Buttons, tags, utilities */
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.tag:hover {
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: 40px 0;
    margin: 20px 0;
  }

  .hero-content {
    padding: 40px 25px;
    border-radius: 16px;
  }

  .hero-name-large {
    font-size: clamp(2.5rem, 10vw, 4rem);
    letter-spacing: -1px;
  }

  .hero-sections {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
  }

  .hero-section-block {
    padding: 20px;
  }

  .hero-tech {
    padding: 20px;
  }
}

/* CV Viewer */
.cv-viewer {
  width: 100%;
  margin-top: 20px;
  position: relative;
}

.cv-viewer iframe {
  min-height: 600px;
}

@media (max-width: 768px) {
  .cv-viewer iframe {
    height: 600px;
    min-height: 600px;
  }
}

@media (min-width: 640px) {
  .project-card {
    grid-column: span 12;
  }
}

@media (min-width: 980px) {
  .project-card {
    grid-column: span 12;
  }
}

/* Carousel */
.carousel-container {
  position: relative;
  max-width: 600px;
  margin: 20px auto;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
}

.carousel-slide {
  display: none;
  width: 100%;
  text-align: center;
}

.carousel-slide.active {
  display: block;
  animation: fade 0.5s ease-in-out;
}

.carousel-slide img {
  width: auto;
  max-width: 100%;
  max-height: 400px;
  display: inline-block;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}