/* ═══════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════ */

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 244, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s8);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color var(--ease);
  position: relative;
}

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

.nav-links a.active {
  color: var(--text);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */

.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: var(--s6) var(--s8);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
}

.footer-left {
  font-size: 0.82rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: var(--s6);
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--muted);
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════
   LAYOUT UTILITAIRES
═══════════════════════════════════════════════════ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s8);
}

.section {
  padding: var(--s16) 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child { border-bottom: none; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s8);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-link {
  font-size: 0.82rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--s1);
  transition: gap var(--ease);
}
.section-link:hover { gap: var(--s2); }

/* ═══════════════════════════════════════════════════
   HOME — HERO
═══════════════════════════════════════════════════ */

.hero {
  padding: var(--s24) 0 var(--s16);
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s6);
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: normal;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--s8);
  max-width: 800px;
}

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

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: var(--s8);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s10);
}

.hero-tag {
  font-size: 0.75rem;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--muted);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: color var(--ease), border-color var(--ease);
}
.hero-cta:hover { color: var(--accent); border-color: var(--accent); }

/* ═══════════════════════════════════════════════════
   PROJET CARDS
═══════════════════════════════════════════════════ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}

.project-card {
  background: var(--surface);
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  cursor: pointer;
  transition: background var(--ease);
}

.project-card:hover { background: var(--bg); }

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text);
}

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

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  margin-top: var(--s2);
}

.project-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.project-open {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: auto;
  padding-top: var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s1);
}

/* ═══════════════════════════════════════════════════
   WRITING LIST
═══════════════════════════════════════════════════ */

.writing-list {
  display: flex;
  flex-direction: column;
}

.article-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  align-items: baseline;
  gap: var(--s6);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--ease);
  text-decoration: none;
  color: var(--text);
}

.article-row:first-child { border-top: 1px solid var(--border); }

.article-row:hover .article-title { color: var(--accent); }

.article-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.article-title {
  font-size: 0.95rem;
  transition: color var(--ease);
}

.article-tags {
  display: flex;
  gap: var(--s1);
}

.article-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.writing-empty {
  padding: var(--s12) 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.writing-empty p:first-child {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: var(--s2);
}

/* ═══════════════════════════════════════════════════
   PAGE WORK (liste complète)
═══════════════════════════════════════════════════ */

.page-hero {
  padding: var(--s12) 0 var(--s8);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s12);
}

.page-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s4);
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--s4);
}

.page-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.65;
}

.filter-bar {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-bottom: var(--s8);
}

.filter-btn {
  font-size: 0.78rem;
  font-weight: 500;
  padding: var(--s1) var(--s3);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--ease);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════
   PAGE ABOUT
═══════════════════════════════════════════════════ */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--s16);
  align-items: start;
  padding: var(--s16) 0;
}

.about-body {}

.about-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: #3d3936;
  margin-bottom: var(--s6);
}

.about-body p strong { color: var(--text); font-weight: 600; }

.about-body h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--text);
  margin-top: var(--s8);
  margin-bottom: var(--s4);
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
}

.about-sidebar {
  position: sticky;
  top: calc(52px + var(--s8));
  display: flex;
  flex-direction: column;
  gap: var(--s6);
}

.sidebar-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4) var(--s4) var(--s4);
  background: var(--surface);
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--s4);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}

.social-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s2);
  border-radius: 5px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background var(--ease);
}
.social-item:hover { background: var(--bg); }

.social-item svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
  flex-shrink: 0;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}

.skill-pill {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════
   PAGE CV
═══════════════════════════════════════════════════ */

.cv-layout {
  max-width: 760px;
  padding: var(--s16) 0 var(--s24);
}

.cv-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: normal;
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.cv-tagline {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: var(--s4);
}

.cv-contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s6);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: var(--s8);
}

.cv-contact-row a { color: var(--muted); transition: color var(--ease); }
.cv-contact-row a:hover { color: var(--accent); }

.cv-print-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s2) var(--s3);
  margin-bottom: var(--s12);
  transition: all var(--ease);
}
.cv-print-btn:hover { border-color: var(--border-2); color: var(--text); }

.cv-section {
  margin-bottom: var(--s12);
}

.cv-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--s3);
  margin-bottom: var(--s6);
}

.cv-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s1) var(--s6);
  margin-bottom: var(--s6);
}
.cv-entry:last-child { margin-bottom: 0; }

.cv-entry-title {
  font-size: 0.93rem;
  font-weight: 600;
  grid-column: 1;
}

.cv-entry-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  grid-column: 2;
  grid-row: 1;
}

.cv-entry-org {
  font-size: 0.85rem;
  color: var(--muted);
  grid-column: 1;
}

.cv-entry-desc {
  font-size: 0.85rem;
  color: #57534e;
  line-height: 1.65;
  grid-column: 1 / -1;
  margin-top: var(--s2);
}

.cv-entry-desc ul { padding-left: var(--s4); }
.cv-entry-desc li { margin-bottom: var(--s1); list-style: disc; }

/* ═══════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--s6);
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  color: var(--muted);
  font-size: 1rem;
  padding: var(--s1) var(--s2);
  border-radius: 4px;
  transition: background var(--ease), color var(--ease);
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-frame {
  flex: 1;
  border: none;
  width: 100%;
  min-height: 540px;
  background: var(--bg);
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .container { padding: 0 var(--s4); }
  .nav-inner { padding: 0 var(--s4); }
  .footer { padding: var(--s6) var(--s4); }
  .hero { padding: var(--s16) 0 var(--s12); }
  .hero-title { font-size: 2.4rem; }
  .about-layout { grid-template-columns: 1fr; }
  .about-sidebar { position: static; }
  .article-row { grid-template-columns: 5rem 1fr; }
  .article-tags { display: none; }
  .cv-entry { grid-template-columns: 1fr; }
  .cv-entry-date { grid-column: 1; grid-row: auto; text-align: left; }
}

@media print {
  .nav, .footer, .cv-print-btn { display: none !important; }
  body { background: white; font-size: 12px; }
  .cv-layout { padding: 0; }
}
