/* Reset & base */
body {
  margin: 0;
  background: linear-gradient(to right, #f0f4f8, #d9e2ec);
  font-family: 'Inter', system-ui, sans-serif;
  color: #1f2937;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background-color: #1f2937;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  box-sizing: border-box;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav a {
  margin-left: 1.5rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
  color: #2563eb;
}

/* Layout */
.content-wrapper {
  flex-grow: 1;
  width: 100%;
  max-width: 800px;
  margin: 2.5rem auto 4rem;
  padding: 0 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}


/* Section animation */
section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

section.active {
  display: block;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blog article styles */
.blog-article {
  display: flex;
  flex-direction: column;
}

.article-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 12px 12px 0 0;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  display: block;
}

.blog-article h1 {
  font-weight: 800;
  font-size: 2.25rem;
  margin-bottom: 0.3rem;
  color: #1e293b;
}

.article-date {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 1.6rem;
  font-style: italic;
}

.blog-article p {
  margin-bottom: 1.3rem;
  font-size: 1.05rem;
  color: #475569;
}

.blog-article ul {
  margin-left: 1.7rem;
  margin-bottom: 1.5rem;
  color: #334155;
  list-style-type: disc;
}

.blog-article ul li {
  margin-bottom: 0.5rem;
}

.blog-article strong {
  color: #2563eb;
}

.blog-article em {
  color: #94a3b8;
  font-style: italic;
}

/* Back button */
.back-button {
  background-color: #1f2937;
  color: white;
  border: none;
  padding: 0.75rem 1.3rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  align-self: start;
  margin-top: 2rem;
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #1f2937;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero img {
  width: clamp(150px, 25vw, 350px);
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}

.hero-info {
  flex: 1;
  min-width: 280px;
  max-width: 700px;
}

.hero-info h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  margin: 0;
  color: #111827;
}

.hero-info h2 {
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  margin: 0.5rem 0;
  color: #374151;
  border: none;
}

.hero-info p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: #4b5563;
  margin: 0.5rem 0 1.5rem;
}

.hero-info a.button {
  display: inline-block;
  background-color: #1f2937;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-right: 1rem;
  margin-top: 1rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  color: #6b7280;
}

/* Contact */
.contact-card {
  max-width: 600px;
  margin: 3rem auto;
  text-align: center;
  font-family: 'Inter', sans-serif;
  padding: 0 1rem;
}

.contact-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-card p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-card p.highlight {
  font-style: italic;
  font-size: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* Social buttons */
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-buttons .btn {
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.4rem;
  border: 1px solid currentColor;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.social-buttons .btn .icon {
  font-size: 1.2rem;
}

/* Brand colors */
.social-buttons .btn.github {
  color: #333;
  border-color: #333;
}
.social-buttons .btn.github:hover {
  background-color: #333;
  color: white;
}

.social-buttons .btn.linkedin {
  color: #0a66c2;
  border-color: #0a66c2;
}
.social-buttons .btn.linkedin:hover {
  background-color: #0a66c2;
  color: white;
}

.social-buttons .btn.cv {
  color: #2d2d2d;
  border-color: #2d2d2d;
}
.social-buttons .btn.cv:hover {
  background-color: #2d2d2d;
  color: white;
}

/* Typography and utilities */
h2 {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.project {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.project a {
  color: #2563eb;
  text-decoration: none;
  display: inline-block;
  margin-right: 1rem;
  margin-top: 0.5rem;
}

.project h3,
#vision ul,
#contact p {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
}

/* Responsive */
@media (max-width: 600px) {
  .content-wrapper {
    margin: 1.5rem 1rem 3rem;
    padding: 1rem;
  }

  .blog-article h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 400px) {
  .social-buttons {
    flex-direction: column;
    gap: 0.7rem;
  }
}

/* --- MOBILE RESPONSIVE ADAPTATION --- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding: 0;
  }

  section.active {
    padding: 1rem;
    margin: 1rem auto;
  }

  .blog-article {
    padding: 0;
  }

  .blog-article h1 {
    font-size: 1.5rem;
    margin-top: 1rem;
  }

  .article-date {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .blog-article p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .blog-article ul {
    margin-left: 1.2rem;
    padding-left: 0.8rem;
  }

  .article-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
  }

  .back-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 2rem;
    text-align: center;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  nav a {
    margin: 0.3rem 0;
    font-size: 1rem;
  }

  .hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
  }

  .hero img {
    width: 60%;
    max-width: 200px;
  }

  .hero-info h1 {
    font-size: 2rem;
    text-align: center;
  }

  .hero-info p {
    font-size: 1rem;
    text-align: center;
  }

  .content-wrapper {
    padding: 1rem;
    margin: 1rem auto;
  }

  footer {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .social-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .social-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
  }
}

/* Adaptation responsive des cartes de projet */
@media (max-width: 768px) {
  .project {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  }

  .project h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .project p {
    font-size: 1rem;
  }

  .project a {
    display: block;
    margin: 0.7rem 0 0;
    font-size: 1rem;
  }

  .project-container {
    padding: 0 1rem;
  }
}

