@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");

/* ------------------- RESET & BASE ------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s, color 0.3s;
}

/* ------------------- COLOR VARIABLES ------------------- */
:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #071533;
  --tag-bg: #fafafa;
  --section-bg: #eaeaea;
  --card-border: #374151;
  --shadow-color: rgba(0, 0, 0, 0.25);
  --accent-color: #3b82f6;
}
body.dark-mode {
  --bg: #111322;
  --text: #e5e7eb;
  --accent: #2b6ec0;
  --tag-bg: #23263a;
  --section-bg: #1a1c2b;
}

/* ------------------- COMMON LAYOUT ------------------- */
.container {
  max-width: 960px;
  margin: auto;
  padding: 2rem 1rem;
}

.section {
  padding: 2rem 0;
  background-color: var(--section-bg);
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  color: var(--accent);
  margin-bottom: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ------------------- HEADER ------------------- */
.header {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: var(--accent);
}

.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
  z-index: 2;
}
.header .name {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
}

.header .tagline {
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #fff;
}

.header > .container {
  z-index: 2;
}

.theme-toggle:hover {
  background: rgba(19, 19, 19, 0.4);
}

.particles-js-canvas-el {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ------------------- ABOUT ------------------- */
.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: justify;
}

.about-content p {
  text-align: justify;
}

.profile-pic {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid var(--accent);
}

/* ------------------- SKILLS ------------------- */
h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.skill-card {
  background-color: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.skill-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--card-bg);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

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

/* Specific icon colors */
.icon-html {
  color: #f59e0b;
}
.icon-css {
  color: #3b82f6;
}
.icon-js {
  color: #facc15;
}
.icon-bootstrap {
  color: #8b5cf6;
}
.icon-php {
  color: #4f46e5;
}
.icon-code {
  color: #9ca3af;
}
.icon-laravel {
  color: #ef4444;
}
.icon-python {
  color: #60a5fa;
}
.icon-django {
  color: #22c55e;
}
.icon-mysql {
  color: #eab308;
}
.icon-helpdesk {
  color: #2dd4bf;
}
.icon-networking {
  color: #f43f5e;
}
.icon-windows {
  color: #06b6d4;
}
/* ------------------- PROJECTS ------------------- */
.projects-grid {
  display: grid;
  gap: 1.25rem;
}

.project-card {
  border: 1px solid #0000002f;
  background-color: var(--bg);
  padding: 1rem;
  border-radius: 8px;
  transition: transform 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card h3 {
  margin-bottom: 0.5rem;
}
.project-card img {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 0.8rem;
  object-fit: cover;
}
.project-link {
  display: inline-flex;
  align-items: center;
  background-color: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background-color 0.3s, transform 0.3s;
}

.project-link:hover {
  background-color: #578fca;
  transform: translateY(-3px);
}

/* ------------------- CONTACT ------------------- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: auto;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: var(--bg);
  color: var(--text);
}

.contact-form button {
  padding: 0.75rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.contact-form button:hover {
  background-color: #0042c5;
}

/* ------------------- FOOTER ------------------- */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

/* ------------------- FADE-IN EFFECT ------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* EXP */
.experience {
  padding: 20px;
  background-color: var(--section-bg);
  color: var(--text);
  text-align: justify;
}

.timeline {
  position: relative;
  max-width: 800px; /* Limit the width for better readability */
  margin: auto;
  padding-left: 20px; /* Space for vertical line */
}

.timeline-item {
  margin: 20px 0;
  position: relative;
}

.timeline-item .timeline-content {
  background-color: var(--tag-bg); /* Darker card background */
  color: var(--text); /* Text color */
  border-radius: 8px;
  padding: 15px;
  position: relative;
  z-index: 1; /* Ensure content is above the line */
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 15px;
  height: 85%;
  width: 2px;
  background-color: var(--accent);
  z-index: 0;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 15px;
  height: 12px;
  width: 12px;
  background-color: var(--accent);
  border-radius: 50%;
  z-index: 1;
}

/* ------------------- RESPONSIVE ------------------- */
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    gap: 2rem;
    text-align: left;
  }
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
  .timeline-item {
    margin: 15px 0;
  }
}
@media (max-width: 480px) {
  .timeline-item {
    margin: 10px 0;
  }
}

/* Updated fade-in with appear trigger */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

.honeypot {
  display: none !important;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
}

.form-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.social-links {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: #fff;
}

.social-links a {
  color: #fff;
  margin: 0 0.5rem;
  text-decoration: none;
  font-size: 2rem;
}
.social-links a:hover {
  color: #4800bb; /* Couleur au survol */
}
.container h2 {
  text-align: center;
  text-transform: uppercase;
}

.email {
  text-align: center;
}

p {
  line-height: 1.5rem;
}
