/* Variables et Reset */
:root {
  --primary: #0f0f0f;
  --secondary: #1a1a1a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --border-color: #2d2d2d;
  --background: #0a0a0a;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] {
  --primary: #ffffff;
  --secondary: #f8f9fa;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --border-color: #d1d5db;
  --background: #f5f7fa;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}

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

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.95);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}

.logo-symbol {
  color: var(--accent);
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle .sun {
  opacity: 1;
  display: block;
}

.theme-toggle .moon {
  opacity: 0;
  display: none;
}

[data-theme="light"] .theme-toggle .sun {
  opacity: 0;
  display: none;
}

[data-theme="light"] .theme-toggle .moon {
  opacity: 1;
  display: block;
}

/* Hero Section */
.hero {
  padding: 140px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.gradient-text {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-image {
  position: relative;
  height: 400px;
}

.floating-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  animation: float 6s ease-in-out infinite;
}

.code-snippet {
  font-family: "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.8;
}

.code-keyword {
  color: #c792ea;
}

.code-variable {
  color: #7dd3fc;
}

.code-string {
  color: #86efac;
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -60%);
  }
}

/* Section Styles */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
}

/* Projets Section */
.projects {
  background: var(--secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--primary);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.project-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
  margin: 0;
  line-height: 1.5;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tag {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-link {
  display: none;
}

/* Improved button styling for project cards */
.btn-see-details {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

.btn-see-details:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-icon {
  transition: var(--transition);
  display: inline-block;
}

.btn-see-details:hover .btn-icon {
  transform: translateX(4px);
}

/* Add category label to project cards */
.project-category {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

/* Compétences Section */
.skills {
  background: var(--primary);
}

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

.skill-category {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.skill-category-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 500;
}

.skill-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 3px;
  animation: progressBar 1s ease-out;
}

@keyframes progressBar {
  from {
    width: 0;
  }
}

/* Contact Section */
.contact {
  background: var(--secondary);
  text-align: center;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  padding: 12px;
  background: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.social-link:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* Footer */
.footer {
  background: var(--primary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-credit {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Adding new styles for About section and Project Details */

/* About Section */
.about {
  background: var(--primary);
  padding: 80px 0;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text {
  color: var(--text-primary);
}

.about-text h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent);
}

.about-text h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.certifications-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.certifications-list li {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  padding: 1.2rem;
  border-radius: 12px;
  position: relative;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.certifications-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.certifications-list li:before {
  content: "✓";
  position: static;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

[data-theme="light"] .certifications-list li {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.15);
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.highlight-card {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: var(--transition);
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

.highlight-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.highlight-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.contact-email a,
.contact-phone a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.contact-email a:hover,
.contact-phone a:hover {
  text-decoration: underline;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--primary);
  padding: 2rem;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--accent);
}

#projectDetail h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

#projectDetail .project-detail-image {
  width: 100%;
  height: 300px;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  object-fit: cover;
}

#projectDetail .project-detail-section {
  margin-bottom: 2rem;
}

#projectDetail .project-detail-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

#projectDetail .project-detail-section p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

#projectDetail .project-detail-section ul {
  list-style: none;
  padding: 0;
}

#projectDetail .project-detail-section li {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  position: relative;
}

#projectDetail .project-detail-section li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Full projects grid for projects.html page */
.projects-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-image {
    display: none;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: var(--primary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    gap: 1rem;
    padding: 2rem 0;
  }

  .nav-links.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

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

  .section-title {
    font-size: 1.8rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-highlights {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .highlight-number {
    font-size: 2rem;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  #projectDetail h2 {
    font-size: 1.5rem;
  }

  .contact-info {
    flex-direction: column;
    font-size: 0.9rem;
  }

  /* Responsive button styling */
  .btn-see-details {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .projects-grid-full {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero {
    padding: 120px 0 60px;
  }

  section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .social-links {
    gap: 1rem;
  }

  .nav-links {
    gap: 0.5rem;
    padding: 1.5rem 0;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 95vh;
  }
}
