@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;600;700;800&display=swap');

/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --bg:       #050610;
  --bg-2:     #0a0d1f;
  --bg-card:  rgba(255,255,255,0.04);
  --border:   rgba(255,255,255,0.08);
  --accent:   #5b3eff;
  --accent-2: #00e5ff;
  --text:     #dce8ff;
  --muted:    #7a8fbe;
  --glow:     rgba(91,62,255,0.25);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Syne', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

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

.container { max-width: 100%; margin: 0 auto; padding: 0 5vw; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 6, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

.brand {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand .dot {
  color: var(--accent-2);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-card);
}

.primary-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: opacity 0.2s, transform 0.15s;
}

.primary-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* Lang switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.5rem;
}

.lang-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 0.15rem;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
}

.lang-btn img {
  width: 26px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.lang-btn:hover { border-color: var(--border); }

.lang-btn.active {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 999;
}

.burger span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.2s;
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
}

/* Ambient glow blobs */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91,62,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,229,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

/* Profile block */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px var(--glow);
  flex-shrink: 0;
}

.hero-title h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-title .subtitle {
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-bio {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(91,62,255,0.08);
}

/* =============================================
   PANELS (colonne droite)
   ============================================= */
.hero-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.25rem 1.4rem;
  border-radius: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.panel:hover {
  border-color: rgba(91,62,255,0.35);
  background: rgba(91,62,255,0.05);
}

.panel-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.panel p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.panel p:last-child { margin-bottom: 0; }

.panel p strong {
  color: var(--text);
  font-weight: 700;
}

/* =============================================
   PROJECTS PAGE
   ============================================= */
.projects-header {
  padding: 4rem 5vw 2.5rem;
  text-align: center;
}

.projects-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}

.projects-header p {
  color: var(--muted);
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 5vw 4rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(91,62,255,0.4);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(91,62,255,0.15);
}

.project-video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #0a0d1f;
}

.project-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.project-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

.project-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.tag-link {
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.tag-link:hover {
  background: rgba(0,229,255,0.1);
  color: var(--accent-2);
  border-color: rgba(0,229,255,0.3);
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  align-self: flex-start;
  transition: opacity 0.2s, transform 0.15s;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 4rem 5vw;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.contact-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 16px;
  transition: border-color 0.2s;
}

.contact-card:hover {
  border-color: rgba(91,62,255,0.35);
}

.contact-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.contact-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.contact-row .label {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 72px;
  padding-top: 1px;
}

.contact-row .value {
  color: var(--text);
}

.contact-row a {
  color: var(--accent-2);
  transition: opacity 0.2s;
}

.contact-row a:hover { opacity: 0.75; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-footer a {
  color: var(--accent-2);
  transition: opacity 0.2s;
}

.site-footer a:hover { opacity: 0.7; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .burger { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5,6,16,0.97);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
    backdrop-filter: blur(16px);
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-switcher {
    margin-right: 0;
    padding: 0.5rem 0.5rem 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    padding-bottom: 0.75rem;
    margin-bottom: 0.25rem;
    order: -1;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
  }



  .hero { padding: 3rem 0 2rem; }

  .profile-block { flex-direction: column; align-items: flex-start; }

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

/* =============================================
   SECTION SHARED
   ============================================= */
.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0.4rem;
}

/* =============================================
   ABOUT
   ============================================= */
.about-section {
  padding: 5rem 5vw;
  border-top: 1px solid var(--border);
}

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

.about-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.1rem;
}

.about-text p:last-child { margin-bottom: 0; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.highlight-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: border-color 0.2s;
}

.highlight-card:hover {
  border-color: rgba(91,62,255,0.35);
}

.highlight-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.highlight-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.highlight-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

/* =============================================
   SKILLS
   ============================================= */
.skills-section {
  padding: 5rem 5vw;
  border-top: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.skill-group-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid transparent;
}

.pill-hot {
  background: rgba(91,62,255,0.15);
  border-color: rgba(91,62,255,0.4);
  color: #c4b5fd;
}

.pill-mid {
  background: rgba(0,229,255,0.07);
  border-color: rgba(0,229,255,0.2);
  color: #7dd3fc;
}

.skill-legend {
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  align-items: center;
}

.pill-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.35rem;
  border: 1px solid transparent;
}

.pill-dot.pill-hot {
  background: rgba(91,62,255,0.4);
  border-color: rgba(91,62,255,0.7);
  padding: 0;
}

.pill-dot.pill-mid {
  background: rgba(0,229,255,0.15);
  border-color: rgba(0,229,255,0.4);
  padding: 0;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* Hero highlight cards */
.hero-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-highlights .highlight-card {
  padding: 0.85rem 1rem;
}

.hero-highlights .highlight-card strong {
  font-size: 0.85rem;
}

.hero-highlights .highlight-card p {
  font-size: 0.78rem;
}
