/* ─── VARIABLES ────────────────────────────────────────────── */
:root {
  /* Couleurs tirées de michael.derrien.tech (hsl 267 75%) */
  --bg:        #09090b;   /* hsl(240 10% 3.9%) dark bg */
  --bg-card:   #111116;
  --bg-card-2: #18181f;
  --purple:    #9333ea;   /* hsl(267 75% 60%) primary dark */
  --purple-dim: rgba(147, 51, 234, 0.15);
  --violet:    #c084fc;   /* lighter purple accent */
  --violet-dim: rgba(192, 132, 252, 0.12);
  --white:     #fafafa;   /* hsl(0 0% 98%) */
  --muted:     #71717a;   /* hsl(240 5% 64.9%) muted-foreground dark */
  --border:    rgba(255, 255, 255, 0.07); /* hsl(240 3.7% 15.9%) */
  --radius:    14px;
  --sidebar-w: 340px;
  --gap:       24px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: none; }

/* ─── CUSTOM CURSOR ────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--purple);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
}

.cursor-follower {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(147, 51, 234, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.25s, height 0.25s;
}

body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower {
  width: 56px; height: 56px;
  border-color: var(--purple);
}

/* ─── LAYOUT ───────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  gap: 60px;
}

/* ─── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 60px 0 40px;
  gap: 32px;
}

/* NAV */
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  position: relative;
  transition: color var(--transition);
}

.nav-link::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--purple);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition);
}

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

.nav-link.active::before { opacity: 1; }

/* HERO NAME */
.hero-name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.name-line {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 6vw, 72px);
  letter-spacing: -0.03em;
  display: block;
}

.accent-purple { color: var(--purple); }
.accent-violet { color: var(--violet); }

/* SUBTITLE */
.hero-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 280px;
  min-height: 48px;
}

/* STATUS BADGE */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--violet);
  background: var(--violet-dim);
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 100px;
  padding: 7px 16px;
  width: fit-content;
}

.status-dot {
  width: 7px; height: 7px;
  background: var(--violet);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* SOCIALS */
.socials {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.social-btn svg { width: 18px; height: 18px; }

.social-btn:hover {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
  transform: translateY(-3px);
}

/* ─── MAIN CONTENT ─────────────────────────────────────────── */
.content {
  flex: 1;
  min-width: 0;
  padding: 80px 0 60px;
}

/* ─── SECTION ──────────────────────────────────────────────── */
.section { margin-bottom: 100px; }

.section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 32px;
}

/* ─── CARDS ────────────────────────────────────────────────── */
.card {
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.card-purple {
  background: var(--purple);
  color: var(--white);
}

.card-violet {
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
  color: var(--white);
}

.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--white);
}

.card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 8px;
}

.card-value {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.card-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 4px;
}

.card-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.card-deco {
  position: absolute;
  bottom: -20px; right: -20px;
  opacity: 0.15;
}

.card-deco-circle {
  width: 100px; height: 100px;
  border: 20px solid currentColor;
  border-radius: 50%;
}

.card-deco-dots {
  width: 80px; height: 80px;
  background-image: radial-gradient(currentColor 2px, transparent 2px);
  background-size: 12px 12px;
}

/* ─── ABOUT GRID ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.about-text {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-text p { color: var(--muted); max-width: 620px; }

.about-langs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-pill {
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
}

.about-grid .card-dark {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* BUTTON */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  width: fit-content;
}

.btn-primary:hover {
  background: #a855f7;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(147, 51, 234, 0.35);
}

/* ─── TIMELINE (EXPERIENCE) ────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 28px 1fr;
  gap: 0 20px;
  padding-bottom: 40px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-left {
  text-align: right;
  padding-top: 3px;
}

.timeline-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

.timeline-duration {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

.timeline-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  opacity: 0.2;
}

.timeline-dot-purple {
  background: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-dim);
}

.timeline-dot-purple::before { background: var(--purple); }

.timeline-dot-violet {
  background: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-dim);
}

.timeline-dot-violet::before { background: var(--violet); }

.timeline-line {
  flex: 1;
  width: 1px;
  background: linear-gradient(to bottom, var(--border), transparent);
  margin-top: 8px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.timeline-content:hover {
  border-color: rgba(147, 51, 234, 0.3);
  box-shadow: 0 4px 24px rgba(147, 51, 234, 0.08);
}

.timeline-company {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 6px;
}

.timeline-role {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.timeline-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── PROJECTS ─────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(147, 51, 234, 0.15);
}

.project-img {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.project-img-1 {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1254 50%, #1a0a2e 100%);
}

.project-img-2 {
  background: linear-gradient(135deg, #0f0520 0%, #1e0a40 50%, #2d1465 100%);
}

.project-img-3 {
  background: linear-gradient(135deg, #150a30 0%, #2a1060 50%, #150a30 100%);
}

.project-img-4 {
  background: linear-gradient(135deg, #0d0a2e 0%, #1e1254 50%, #0d0a2e 100%);
}

/* grid overlay */
.project-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 51, 234, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 51, 234, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.project-img-1::after {
  content: '</>';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 48px;
  color: var(--violet);
  opacity: 0.35;
  pointer-events: none;
}

.project-img-2::after {
  content: 'MD';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: -0.04em;
  color: var(--purple);
  opacity: 0.35;
  pointer-events: none;
}

.project-img-3::after {
  content: '⚙';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 52px;
  color: var(--violet);
  opacity: 0.35;
  pointer-events: none;
}

.project-img-4::after {
  content: 'G1';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 52px;
  letter-spacing: -0.04em;
  color: var(--violet);
  opacity: 0.35;
  pointer-events: none;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
  pointer-events: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 100px;
  transform: translateY(10px);
  transition: transform var(--transition), background var(--transition);
}

.project-card:hover .project-link { transform: translateY(0); }
.project-link:hover { background: #a855f7; }

.project-info { padding: 24px; }

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* TAGS */
.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg-card-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.tag-purple {
  background: var(--purple-dim);
  color: var(--violet);
  border-color: rgba(147, 51, 234, 0.25);
}

.tag-violet {
  background: var(--violet-dim);
  color: var(--violet);
  border-color: rgba(192, 132, 252, 0.25);
}

.project-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.project-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── SKILLS ───────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.skill-group-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 24px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-card-2);
  border-radius: 100px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--purple);
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill-violet { background: var(--violet); }
.skill-fill.animated { width: var(--w); }

.tech-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 200px;
}

.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-pill {
  background: rgba(9, 9, 11, 0.3);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--white);
}

/* ─── CONTACT ──────────────────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-left p {
  color: var(--muted);
  font-size: 15px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  transition: color var(--transition);
}

.contact-link:hover { color: var(--purple); }

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* ─── FOOTER ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ─── REVEAL ANIMATION ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

/* ─── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-card-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
    padding: 40px 32px;
    gap: 0;
  }

  .sidebar {
    width: 100%;
    position: relative;
    height: auto;
  }

  .sidebar-inner {
    padding: 60px 0 48px;
    gap: 24px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .nav-link::before { display: none; }

  .content { padding: 0 0 60px; }

  .timeline-item {
    grid-template-columns: 120px 28px 1fr;
  }
}

@media (max-width: 768px) {
  .layout { padding: 32px 20px; }

  .about-grid,
  .projects-grid,
  .skills-grid,
  .contact-wrap { grid-template-columns: 1fr; }

  .project-card-wide { grid-column: auto; }

  .timeline-item {
    grid-template-columns: 28px 1fr;
    gap: 0 16px;
  }

  .timeline-left { display: none; }

  .timeline-content::before {
    content: attr(data-date);
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
  }

  .socials { margin-top: 0; }

  body { cursor: auto; }
  .cursor, .cursor-follower { display: none; }
}
