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

:root {
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e4e8ee;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --radius: 12px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px 48px;
  gap: 64px;
}

/* ── Profil ── */
.profile {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
}

h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -.03em;
  color: var(--text);
}

.bio {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 520px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.link-primary,
.link-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}

.link-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.link-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.link-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.link-secondary:hover { border-color: #9ca3af; }

/* ── Projets ── */
.projects {
  width: min(900px, 100%);
}

.section-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 20px;
}

.project-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.project-card:has(.project-link):hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(29,78,216,.08);
}

.project-link {
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.project-card:not(:has(.project-link)) { padding: 22px; }

.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-desc {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  margin-top: auto;
}
.tech-tags li {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .2rem .6rem;
  border-radius: 999px;
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .page { padding: 40px 16px 32px; gap: 48px; }
  .project-grid { grid-template-columns: 1fr; }
}
