  :root {
    --ivory: #F5F0E8;
    --ivory-warm: #EDE7D8;
    --beige: #D4C9B0;
    --beige-mid: #C2B496;
    --leather: #8B6F4E;
    --leather-dark: #6B5237;
    --forest: #2C3E2D;
    --forest-mid: #3D5142;
    --forest-light: #4E6655;
    --ink: #1A1612;
    --ink-soft: #2E2820;
    --gold: #B8962E;
    --gold-light: #D4B04A;
    --copper: #8B5E3C;
    --text-main: #1A1612;
    --text-body: #3A3028;
    --text-muted: #7A6E60;
    --text-pale: #A89E8E;
    --rule: #C8BBA8;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--ivory);
    color: var(--text-main);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 18px;
    line-height: 1.75;
    overflow-x: hidden;
  }

  /* ── Navigation ── */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
  }

  .nav-monogram {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--forest);
    text-decoration: none;
  }

  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
  }

  .nav-links a {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
  }

  .nav-links a:hover { color: var(--forest); }

  /* ── Helpers ── */
  .gold-rule {
    width: 60px;
    height: 1.5px;
    background: var(--gold);
    margin: 1.5rem 0;
  }

  .section-label {
    font-family: 'EB Garamond', serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
  }

  .page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
  }

  /* ── Hero ── */
  #hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 80% 60% at 70% 50%, rgba(44, 62, 45, 0.06) 0%, transparent 60%),
      linear-gradient(175deg, var(--ivory) 60%, var(--ivory-warm) 100%);
  }

  .hero-texture {
    position: absolute;
    inset: 0;
    background-image:
      repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(200,187,168,0.15) 39px, rgba(200,187,168,0.15) 40px),
      repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(200,187,168,0.06) 79px, rgba(200,187,168,0.06) 80px);
    pointer-events: none;
  }

  .hero-left {
    position: relative;
    z-index: 2;
    padding: 6rem 4rem 6rem 5rem;
  }

  .hero-issue {
    font-family: 'EB Garamond', serif;
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .hero-issue::before {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: var(--copper);
  }

  .hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
  }

  .hero-title em {
    font-style: italic;
    color: var(--forest);
  }

  .hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--leather);
    margin-bottom: 2.5rem;
    line-height: 1.5;
  }

  .hero-intro {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: var(--text-body);
    line-height: 1.85;
    max-width: 520px;
    margin-bottom: 3rem;
  }

  .hero-cta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }

  .btn-primary {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    background: var(--forest);
    color: var(--ivory);
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--forest);
    transition: all 0.3s;
  }

  .btn-primary:hover {
    background: transparent;
    color: var(--forest);
  }

  .btn-ghost {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
  }

  .btn-ghost::after {
    content: '→';
    transition: transform 0.3s;
  }

  .btn-ghost:hover { color: var(--forest); }
  .btn-ghost:hover::after { transform: translateX(4px); }

  .hero-right {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-portrait-frame {
    position: relative;
    width: 420px;
    height: 560px;
  }

.hero-portrait-bg {
  position: absolute;
  inset: 0;
  /* Fusion de l'image (au premier plan) et du dégradé (en arrière-plan) */
  background-image: url("me2.png"), linear-gradient(145deg, var(--forest) 0%, var(--forest-mid) 40%, var(--leather-dark) 100%);
  
  /* Paramètres pour que l'image soit bien centrée et calibrée */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

  .hero-portrait-overlay {
    position: absolute;
    inset: 0;
    background:
      repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
      linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.4) 100%);
  }

  .hero-portrait-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
  }

  .portrait-terminal {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(212, 176, 74, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .portrait-terminal .cursor {
    display: inline-block;
    width: 7px;
    height: 13px;
    background: var(--gold-light);
    opacity: 0.8;
    animation: blink 1.2s step-end infinite;
    vertical-align: middle;
  }

  @keyframes blink { 50% { opacity: 0; } }

  .portrait-initials {
    font-family: 'Playfair Display', serif;
    font-size: 7rem;
    font-weight: 700;
    color: rgba(245, 240, 232, 0.08);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    line-height: 1;
    pointer-events: none;
    letter-spacing: -0.05em;
  }

  .portrait-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ivory);
    letter-spacing: 0.02em;
  }

  .portrait-role {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--gold-light);
    margin-top: 0.3rem;
  }

  .frame-border {
    position: absolute;
    top: -12px; left: -12px;
    right: 12px; bottom: 12px;
    border: 1.5px solid var(--gold);
    pointer-events: none;
  }

  /* ── Sections générales ── */
  section {
    padding: 7rem 0;
    position: relative;
  }

  section:nth-child(even) {
    background: var(--ivory-warm);
  }

  .section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5rem;
  }

  .section-header {
    margin-bottom: 4rem;
  }

  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }

  .section-title em {
    font-style: italic;
    color: var(--forest);
  }

  /* ── Manifeste ── */
  #manifeste .manifeste-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 6rem;
    align-items: start;
  }

  .manifeste-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-body);
  }

  .manifeste-pillars {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .pillar {
    border-left: 2px solid var(--gold);
    padding-left: 1.5rem;
  }

  .pillar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 0.4rem;
  }

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

  .pull-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-style: italic;
    color: var(--forest);
    line-height: 1.4;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 2rem 0;
    margin: 3rem 0;
  }

  /* ── Chronologie ── */
  #chronologie .timeline {
    position: relative;
    padding-left: 3rem;
  }

  #chronologie .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--beige) 10%, var(--beige) 90%, transparent);
  }

  .chapter {
    position: relative;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--rule);
  }

  .chapter:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .chapter-marker {
    position: absolute;
    left: -3.4rem;
    top: 0.3rem;
    width: 16px;
    height: 16px;
    border: 2px solid var(--gold);
    background: var(--ivory);
    transform: rotate(45deg);
  }

  .chapter-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
  }

  .chapter-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.8rem;
    font-style: italic;
  }

  .chapter-body {
    font-size: 1.05rem;
    color: var(--text-body);
    line-height: 1.9;
    max-width: 680px;
  }

  .chapter-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
  }

  .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--beige-mid);
    color: var(--text-muted);
    background: transparent;
  }

  /* ── Expertise ── */
  #expertise .skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--rule);
    border: 1px solid var(--rule);
  }

  .skill-domain {
    background: var(--ivory);
    padding: 2.5rem 2rem;
    transition: background 0.3s;
    cursor: default;
  }

  #expertise .section-inner:nth-child(even) .skill-domain,
  section:nth-child(even) .skill-domain {
    background: var(--ivory-warm);
  }

  .skill-domain:hover {
    background: var(--ivory-warm);
    z-index: 1;
  }

  .skill-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .skill-icon::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--gold);
  }

  .skill-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--forest);
    margin-bottom: 0.8rem;
  }

  .skill-reflection {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.75;
    font-style: italic;
  }

  /* ── Laboratoire ── */
  #laboratoire .projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .project-card {
    border: 1px solid var(--rule);
    padding: 2.5rem;
    position: relative;
    transition: border-color 0.3s;
    background: var(--ivory);
  }

  .project-card:hover {
    border-color: var(--gold);
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 0;
    background: var(--forest);
    transition: height 0.4s;
  }

  .project-card:hover::before { height: 100%; }

  .project-type {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 1.2rem;
  }

  .project-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.8rem;
  }

  .project-desc {
    font-size: 0.97rem;
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }

  .project-stack {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-pale);
    letter-spacing: 0.05em;
  }

  .project-featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

.project-featured-visual {
  /* Fusion du dégradé et de l'image (l'image en premier pour être au-dessus) */
  background-image: url("me.png"), linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 60%, var(--leather-dark) 100%);
  
  /* Options recommandées pour que l'image s'adapte bien */
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}

  .project-featured-visual::before {
    content: 'MEMLENZ';
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: rgba(245,240,232,0.06);
    position: absolute;
    letter-spacing: 0.05em;
  }

  .featured-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ivory);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .featured-logo span {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 300;
    font-style: italic;
    color: var(--gold-light);
    letter-spacing: 0.15em;
    margin-top: 0.3rem;
  }

  .project-featured-content {
    padding: 3rem;
    border: 1px solid var(--rule);
    border-left: none;
    background: var(--ivory);
  }

  /* ── Bibliothèque ── */
  #bibliotheque .library-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
  }

  .book-card {
    padding: 1.8rem 1.5rem;
    border-bottom: 2px solid var(--forest);
    background: var(--ivory);
    transition: transform 0.3s;
    cursor: default;
  }

  .book-card:hover { transform: translateY(-4px); }

  .book-spine {
    width: 3px;
    height: 40px;
    background: var(--gold);
    margin-bottom: 1rem;
  }

  .book-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.4rem;
    line-height: 1.3;
  }

  .book-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
  }

  .book-note {
    font-size: 0.82rem;
    color: var(--text-pale);
    line-height: 1.6;
  }

  /* ── Citations ── */
  #citations {
    background: var(--forest) !important;
    color: var(--ivory);
  }

  #citations .section-label { color: var(--gold-light); }

  .citations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .citation-item {
    border-top: 1px solid rgba(200,187,168,0.2);
    padding-top: 2rem;
  }

  .citation-mark {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--gold);
    line-height: 0.8;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.6;
  }

  .citation-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--ivory);
    line-height: 1.6;
  }

  /* ── Footer ── */
  footer {
    background: var(--ink);
    color: var(--ivory);
    padding: 4rem 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-left .footer-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ivory);
    margin-bottom: 0.3rem;
  }

  .footer-left .footer-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    font-style: italic;
    color: var(--gold-light);
  }

  .footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
  }

  .footer-links a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--beige);
    text-decoration: none;
    transition: color 0.3s;
  }

  .footer-links a:hover { color: var(--gold-light); }

  .footer-right {
    font-family: 'EB Garamond', serif;
    font-size: 0.85rem;
    color: var(--text-pale);
    text-align: right;
  }

  /* ── Animations ── */
  .fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

  /* ── Responsive ── */
  @media (max-width: 900px) {
    nav { padding: 1rem 2rem; }
    #hero { grid-template-columns: 1fr; padding: 100px 2rem 3rem; }
    .hero-right { display: none; }
    .hero-left { padding: 2rem; }
    .section-inner { padding: 0 2rem; }
    #manifeste .manifeste-layout { grid-template-columns: 1fr; gap: 3rem; }
    #expertise .skills-grid { grid-template-columns: 1fr 1fr; }
    #laboratoire .projects-grid { grid-template-columns: 1fr; }
    .project-featured { grid-column: span 1; }
    .project-featured-visual { display: none; }
    #bibliotheque .library-grid { grid-template-columns: 1fr 1fr; }
    .citations-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-right { text-align: center; }
  }
