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

/* ─── Variables ──────────────────────────────────────────── */
:root {
  --bg:      #ffffff;
  --text:    #141414;
  --muted:   #5a5a5a;
  --accent:  #1f3cff; /* bleu roi */
  --accent-rgb: 31, 60, 255;
  --border:  rgba(var(--accent-rgb), 0.20);
  --surface: rgba(var(--accent-rgb), 0.06);
  --max-w:   860px;
  --nav-h:   68px;
  --sans:    'Inter', sans-serif;
  --serif:   'DM Serif Display', serif;
}

/* ─── Base ───────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: radial-gradient(1200px 900px at 18% 8%, rgba(var(--accent-rgb), 0.10), rgba(var(--accent-rgb), 0) 55%),
              radial-gradient(1000px 800px at 85% 22%, rgba(var(--accent-rgb), 0.07), rgba(var(--accent-rgb), 0) 52%),
              var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: none;
}

::selection { background: rgba(var(--accent-rgb), 0.22); color: var(--text); }

/* ─── Grain ──────────────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.038;
  pointer-events: none;
  z-index: 9999;
  animation: grain 7s steps(8) infinite;
}

@keyframes grain {
  0%   { transform: translate(0,    0   ); }
  12%  { transform: translate(-2%,  -3% ); }
  25%  { transform: translate( 3%,   1% ); }
  37%  { transform: translate(-1%,   4% ); }
  50%  { transform: translate( 2%,  -2% ); }
  62%  { transform: translate(-3%,   1% ); }
  75%  { transform: translate( 1%,  -3% ); }
  87%  { transform: translate(-2%,   2% ); }
  100% { transform: translate(0,    0   ); }
}

/* ─── Custom Cursor ──────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: left, top;
}

.cursor-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  transition: transform 0.1s ease, background 0.25s ease;
}

.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(20, 20, 20, 0.22);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

body.cursor-hover .cursor-dot  { transform: translate(-50%, -50%) scale(0); }
body.cursor-hover .cursor-ring { width: 52px; height: 52px; border-color: rgba(var(--accent-rgb), 0.35); }

/* ─── Navigation ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  transition: background 0.4s ease, border-color 0.4s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 2.25rem; }

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

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

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--nav-h) 3rem 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.2s forwards;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(5.5rem, 13.5vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 2.5rem;
  min-height: 0.88em;
}

.hero-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 340px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 0.85s forwards;
}

.hero-chips {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fadeUp 0.7s ease 1.05s forwards;
}

.chip-dot { opacity: 0.3; }

.hero-socials {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 1.2s forwards;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: 100px;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.social-link:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: var(--surface);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s ease 1.5s forwards;
}

.hero-scroll-hint span {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 44px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--muted);
  transform: translateX(-100%);
  animation: scanLine 2.2s ease-in-out 2s infinite;
}

@keyframes scanLine {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0);     }
  100% { transform: translateX(100%);  }
}

/* ─── Sections ───────────────────────────────────────────── */
.section {
  border-top: 1px solid var(--border);
  padding: 6.5rem 0;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3.5rem;
}

/* ─── About ──────────────────────────────────────────────── */
.section-body { display: grid; gap: 1.75rem; }

.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.35;
  color: var(--text);
  max-width: 540px;
}

.body-copy {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.95;
  max-width: 500px;
}

/* ─── Work ───────────────────────────────────────────────── */
.projects { display: grid; }

.project-rule { height: 1px; background: var(--border); }

.project { padding: 3.25rem 0; }

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.project-info { flex: 1; }

.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  color: var(--text);
  margin-bottom: 0.8rem;
  transition: color 0.3s ease;
}

.project-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.project-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.9;
  max-width: 490px;
  margin-bottom: 1.25rem;
}

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

.project-tags span {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 100px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.project:hover .project-tags span {
  border-color: rgba(var(--accent-rgb), 0.24);
  color: var(--accent);
}

.project-year {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.3rem;
}

/* ─── Articles ───────────────────────────────────────────── */
.articles-list { display: grid; }

.article-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.25s ease;
}

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

.article-item:hover .article-title { color: var(--accent); }
.article-item:hover .article-arrow { transform: translateX(5px); opacity: 1; }
 .article-item:hover { background: var(--surface); }

.article-date {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.article-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.35rem;
  transition: color 0.25s ease;
}

.article-excerpt {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
}

.article-arrow {
  font-size: 1rem;
  color: var(--muted);
  opacity: 0.4;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ─── Links ──────────────────────────────────────────────── */
.links-intro {
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.links-intro p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.9;
}

.links-list {
  display: grid;
  gap: 0.75rem;
}

.link-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}

.link-item:last-child {
  border-bottom: 1px solid var(--border);
}

.link-label {
  font-size: 0.9rem;
  color: var(--text);
}

.link-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 640px) {
  .article-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .article-arrow { display: none; }
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.75rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.footer-links { display: flex; gap: 1.75rem; }

.footer-links a {
  font-size: 0.76rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.25s ease;
}

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

/* ─── Reveal ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Scramble dud ───────────────────────────────────────── */
.dud { color: var(--accent); opacity: 0.4; }

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }

  nav { padding: 0 1.5rem; }

  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-scroll-hint { left: 1.5rem; }

  .container { padding: 0 1.5rem; }

  .section { padding: 4rem 0; }

  .project-top {
    flex-direction: column;
    gap: 0.4rem;
  }

  .project-year { order: -1; }

  .footer-links { gap: 1rem; }
}
