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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img,
svg {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

:root {
  --bg: #ffffff;
  --bg-subtle: #f7f7f8;
  --text: #18181b;
  --text-muted: #52525b;
  --border: #e4e4e7;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --container: 1120px;
  --container-prose: 720px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;

  --transition: 150ms ease;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-subtle: #18181b;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
}

html,
body {
  background-color: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.25;
}

h1 {
  font-size: clamp(1.75rem, 4.5vw + 0.75rem, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(1.375rem, 2.5vw + 0.75rem, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

h3 {
  font-size: clamp(1.125rem, 1vw + 0.875rem, 1.25rem);
  font-weight: 600;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

p {
  color: var(--text);
}

a {
  color: var(--accent);
  transition: color var(--transition);
}

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

.prose a,
main p a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

main p a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--bg-subtle);
  padding: 0.15em 0.35em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

blockquote {
  border-left: 3px solid var(--border);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--text-muted);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

.container-prose {
  max-width: var(--container-prose);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

main {
  min-height: 60vh;
}

.section {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
}

.section:first-of-type {
  padding-top: clamp(2rem, 5vw, 3rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}

[data-theme="dark"] .site-header::before {
  background-color: rgba(9, 9, 11, 0.8);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.nav-primary {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-primary a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-primary a:hover,
.nav-primary a[aria-current="page"] {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition);
}

.icon-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--text);
}

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

[data-theme="dark"] .icon-btn .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-btn .icon-moon {
  display: none;
}

.icon-btn .icon-sun {
  display: none;
}

.icon-btn .icon-moon {
  display: block;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: var(--radius-sm);
}

.nav-toggle:hover {
  background-color: var(--bg-subtle);
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .nav-primary {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem clamp(1rem, 4vw, 1.5rem) 1rem;
    gap: 0.125rem;
    transform: translateY(-110%);
    transition: transform 250ms ease;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  }

  [data-theme="dark"] .nav-primary {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  }

  .nav-primary.is-open {
    transform: translateY(0);
  }

  .nav-primary a {
    font-size: 1rem;
    color: var(--text);
    padding: 0.875rem 0.75rem;
    border-radius: var(--radius-md);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-primary a:hover,
  .nav-primary a:focus-visible,
  .nav-primary a[aria-current="page"] {
    background-color: var(--bg-subtle);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle svg line {
    transform-origin: 12px 12px;
    transition: transform 220ms ease, opacity 160ms ease;
  }

  .nav-toggle[aria-expanded="true"] svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] svg line:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-actions .icon-btn--github {
    display: none;
  }
}

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}

.hero__eyebrow {
  display: inline-block;
  max-width: 100%;
  font-size: clamp(0.75rem, 0.5vw + 0.625rem, 0.8125rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background-color: var(--bg-subtle);
  line-height: 1.4;
}

.hero h1 {
  margin-bottom: 0.75rem;
}

.hero__subtitle {
  font-size: clamp(1rem, 1vw + 0.875rem, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.hero__lead {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.0625rem);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 2rem;
}

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

.hero__cta .btn {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 480px) {
  .hero__cta .btn {
    flex: 0 0 auto;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--accent);
  color: var(--accent-fg) !important;
}

.btn--primary:hover {
  background-color: var(--accent-hover);
  color: var(--accent-fg) !important;
}

.btn--secondary {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text) !important;
}

.btn--secondary:hover {
  background-color: var(--bg-subtle);
  color: var(--text) !important;
}

.btn--ghost {
  background-color: transparent;
  color: var(--text-muted) !important;
  padding: 0.5rem 0.875rem;
}

.btn--ghost:hover {
  background-color: var(--bg-subtle);
  color: var(--text) !important;
}

.section__eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: block;
}

.section__title {
  margin-bottom: 1.25rem;
}

.section__lead {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.0625rem);
}

.about__lead {
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.0625rem);
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.about__lead strong {
  color: var(--text);
}

.about__h3 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.languages {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  max-width: 720px;
}

.languages li {
  padding: 0.75rem 0;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
}

.languages li strong {
  color: var(--text);
  margin-right: 0.5rem;
}

.skills-table-wrap {
  max-width: 820px;
}

.skills-table th {
  width: 30%;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

.skills-table td {
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .skills-table th,
  .skills-table td {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border-bottom: 0;
  }

  .skills-table th {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    background-color: transparent;
  }

  .skills-table tr:first-child th {
    border-top: 0;
    padding-top: 0.75rem;
  }

  .skills-table td {
    padding-bottom: 1rem;
  }
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw + 0.5rem, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--bg);
  transition: border-color var(--transition), background-color var(--transition);
}

.card:hover {
  border-color: var(--text-muted);
  background-color: var(--bg-subtle);
}

.card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.card__id {
  color: var(--accent);
  font-weight: 600;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.card__desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.card__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.card__link:hover {
  color: var(--accent-hover);
}

.card__link::after {
  content: "→";
  transition: transform var(--transition);
}

.card:hover .card__link::after {
  transform: translateX(2px);
}

.veille-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background-color: var(--bg-subtle);
}

.veille-summary p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.veille-summary p:last-of-type {
  margin-bottom: 1.5rem;
}

.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
  .contact-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-item {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 3vw, 1.25rem);
  min-height: 44px;
}

.contact-item__label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.contact-item__value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-all;
}

.contact-item__value:hover {
  color: var(--accent);
}

.contact-note {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-style: italic;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3rem;
  margin-top: 4rem;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 720px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
  }
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer__links a:hover {
  color: var(--text);
}

.page-header {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb__sep {
  margin: 0 0.5rem;
  color: var(--border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header__subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.prose {
  padding: clamp(2rem, 5vw, 2.5rem) 0 clamp(2.5rem, 6vw, 3.5rem);
}

.prose .prose__inner {
  max-width: var(--container-prose);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

.prose h2 {
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  scroll-margin-top: 80px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h4 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose p + p {
  margin-top: 0;
}

.prose > ul,
.prose > ol,
.prose section ul,
.prose section ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.375rem;
  padding-left: 0.25rem;
}

.prose li::marker {
  color: var(--text-muted);
}

.prose blockquote {
  margin: 1.5rem 0;
}

.prose blockquote p {
  margin-bottom: 0.5rem;
}

.prose blockquote.exergue {
  font-size: 1.125rem;
  border-left-width: 3px;
  border-left-color: var(--accent);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0 2.5rem;
}

.prose .note {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 1.5rem 0;
}

.prose .note strong {
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

table th,
table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

table th {
  background-color: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
}

table tr:last-child td {
  border-bottom: 0;
}

.id-table {
  margin: 0 0 2rem;
}

.id-table table {
  font-size: 0.9375rem;
}

.id-table th {
  width: 30%;
  background-color: var(--bg-subtle);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 600px) {
  .id-table th {
    width: 38%;
  }
}

.synthese-table {
  font-size: 0.875rem;
}

.synthese-table th,
.synthese-table td {
  min-width: 140px;
}

.synthese-table th:first-child,
.synthese-table td:first-child {
  min-width: 280px;
  position: sticky;
  left: 0;
  background-color: var(--bg);
}

.synthese-table thead th:first-child,
.synthese-table tbody th:first-child,
.synthese-table thead th {
  background-color: var(--bg-subtle);
}

.synthese-table .check {
  text-align: center;
  font-weight: 600;
  color: var(--accent);
}

.synthese-table .competence-detail {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 0.5rem;
  white-space: normal;
}

.synthese-section-row td {
  background-color: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.page-back a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.page-back a:hover {
  color: var(--text);
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 1.5rem);
}

.error-page__code {
  font-size: clamp(3rem, 6vw + 1rem, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin: 1rem 0 2rem;
  max-width: 400px;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 400ms ease, transform 400ms ease;
  }

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-muted {
  color: var(--text-muted);
}

.identity-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 720px;
}

.identity-block p {
  margin-top: 0.25rem;
}

.synthese-note {
  font-size: 0.875rem;
  margin-top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
