/* ----- VARIABLES ----- */
:root {
  --bg-color: #0c0c0e;
  --text-main: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-mint: #00ffa3;
  --accent-purple: #7b4dff;
  --accent-blue: #0084ff;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --container-width: 1200px;
}

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

body {
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ----- HEADER / NAVBAR ----- */
header {
  background: rgba(12, 12, 14, 0.8);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

nav {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 35px;
  filter: brightness(1.2);
}

.menu-toggle {
  display: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
}

nav a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-mint);
}

/* ----- HERO ----- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
  background: transparent;
}

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.hero .name {
  color: var(--accent-mint);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--accent-mint);
  color: var(--accent-mint);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: rgba(0, 255, 163, 0.05);
}

.btn-primary:hover {
  background: var(--accent-mint);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(0, 255, 163, 0.3);
}

/* ----- SECTIONS ----- */
section {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 100px 40px;
}

section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: 700;
  color: var(--text-main);
}

section h2 span {
  color: var(--accent-mint);
}

/* ----- SKILLS (Tag Cloud) ----- */
.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: flex-start;
  max-width: 900px;
}

.skill-tag {
  font-size: 1rem;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--accent-mint);
  color: var(--accent-mint);
  transform: translateY(-2px);
  background: rgba(0, 255, 163, 0.05);
}

.skill-tag.large {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.skill-tag.medium {
  font-size: 1.5rem;
  font-weight: 700;
}

.skill-tag.small {
  font-size: 0.9rem;
  font-weight: 500;
}

.skill-tag.mint {
  color: var(--accent-mint);
  border-color: rgba(0, 255, 163, 0.2);
}

.skill-tag.purple {
  color: var(--accent-purple);
  border-color: rgba(123, 77, 255, 0.2);
}

.skill-tag.blue {
  color: var(--accent-blue);
  border-color: rgba(0, 132, 255, 0.2);
}

/* ----- ALTERNANCE ----- */
.alternance-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3rem;
  border-radius: 12px;
  max-width: 900px;
  margin: 3rem auto 0;
  text-align: left;
}

.alternance-box h3 {
  color: var(--accent-mint);
  margin-bottom: 1.5rem;
}

.alternance-list {
  list-style: none;
  margin-bottom: 2.5rem;
}

.alternance-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.alternance-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-mint);
  font-weight: bold;
}

/* ----- CONTACT ----- */
.contact {
  text-align: center;
  padding: 100px 20px;
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
}

.contact h2 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.contact p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact .btn-primary {
  font-size: 1.1rem;
  padding: 16px 40px;
}

.alternance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.alternance-item strong {
  display: block;
  color: var(--accent-mint);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.alternance-item p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ----- CARDS (Common) ----- */
.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

/* ----- PROJECTS (Laptop Mockup) ----- */
.project-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 8rem;
}

.project-item:nth-child(even) {
  direction: rtl;
}

.project-item:nth-child(even) .project-content {
  direction: ltr;
}

.laptop-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a1a1e;
  border-radius: 12px;
  padding: 10px;
  border: 4px solid #333;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.laptop-mockup::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -10%;
  width: 120%;
  height: 12px;
  background: #2a2a2e;
  border-radius: 0 0 20px 20px;
}

.laptop-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.laptop-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.project-buttons {
  display: flex;
  gap: 1.5rem;
}

.btn-outline {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

/* ----- EXPERIENCE / FORMATION ----- */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.card h3 {
  color: var(--accent-mint);
  margin-bottom: 0.5rem;
}

.card .date {
  font-size: 0.9rem;
  color: var(--accent-purple);
  margin-bottom: 1rem;
  display: block;
}

.card ul {
  list-style: none;
}

.card ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-mint);
}

.contact input,
.contact textarea {
  padding: 10px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e0e0e0;
  border-radius: 5px;
}

.contact input:focus,
.contact textarea:focus {
  outline: none;
  border: 1px solid #1f6feb;
}

.contact button {
  padding: 12px;
  border: none;
  background: #1f6feb;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.3s;
}

.contact button:hover {
  background: #1158c7;
}

/* ----- RESPONSIVE NAV ----- */
@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
  }

  header {
    padding: 15px 20px;
  }

  .menu-toggle {
    display: block;
  }

  nav ul {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
    padding-top: 10px;
    display: none;
    background: rgba(10, 25, 47, 0.95);
  }

  nav ul.open {
    display: flex;
  }
}

/* ----- FOOTER ----- */
footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-mint);
  transform: translateY(-3px);
}

/* ----- RESPONSIVE ----- */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .project-item {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
  }

  .project-item:nth-child(even) {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  :root {
    --container-width: 100%;
  }

  header {
    padding: 15px 0;
  }

  nav {
    padding: 0 20px;
  }

  .hero {
    padding: 0 20px;
    align-items: center;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.8rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .hero-btns {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-btns .btn-primary,
  .hero-btns .btn-outline {
    width: 100%;
    text-align: center;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(12, 12, 14, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 30px 20px;
    gap: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
  }

  nav ul.open {
    display: flex;
  }

  section {
    padding: 80px 20px;
  }

  h2 {
    font-size: 2.2rem !important;
  }

  .alternance-box {
    padding: 1.5rem;
  }

  .skills-container {
    gap: 0.8rem;
    padding: 0 10px;
  }

  .skill-tag.large {
    font-size: 1.6rem;
  }

  .skill-tag.medium {
    font-size: 1.2rem;
  }

  .skill-tag.small {
    font-size: 0.85rem;
  }

  .project-item {
    margin-bottom: 4rem;
  }

  .laptop-mockup {
    margin-bottom: 1.5rem;
  }

  .project-content h3 {
    font-size: 1.8rem;
  }

  .project-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .project-buttons a {
    width: 100%;
    text-align: center;
  }

  .contact h2 {
    font-size: 2.2rem;
  }

  .footer-social {
    gap: 1.5rem;
  }
}