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

:root {
  --bg:      #F4F2ED;
  --ink:     #0E0E0D;
  --muted:   #888075;
  --accent:  #FF6B35;
  --line:    rgba(14,14,13,0.1);
  --mono:    'DM Mono', monospace;
  --display: 'Syne', sans-serif;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── NOISE ── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 5vw;
  transition: background .4s, box-shadow .4s;
}
#nav.scrolled {
  background: rgba(244,242,237,0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-logo {
  font-family: var(--display);
  font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none; color: var(--ink);
  position: relative; z-index: 101;
}
.dot { color: var(--accent); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none;
  color: var(--muted);
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0; right: 100%;
  height: 1px; background: var(--ink);
  transition: right .35s var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after,
.nav-links a:hover::after { right: 0; }

/* ── MOBILE MENU ── */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  position: relative; z-index: 101; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg);
  flex-direction: column; align-items: center; justify-content: center;
  gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--display); font-weight: 700;
  font-size: 2rem; letter-spacing: -0.03em;
  text-decoration: none; color: var(--ink);
  transition: color .2s;
}
.mobile-menu a.active,
.mobile-menu a:hover { color: var(--muted); }

/* ── REVEAL ── */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
[data-reveal].visible { opacity: 1; transform: none; }

/* ── SECTION BASE ── */
section { position: relative; z-index: 1; }
main { padding-top: 80px; }

.section-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 6rem 5vw;
}
.section-header {
  display: flex; align-items: baseline; gap: 1.5rem;
  margin-bottom: 4rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.section-index { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.section-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em; line-height: 1;
}

/* ── BTN ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  background: var(--ink); color: var(--bg);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.05em;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .2s, transform .25s var(--ease);
}
.btn-primary:hover { background: #2a2a28; transform: translateX(5px); }

/* ══════════════ HERO ══════════════ */
#hero {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center;
  padding: 4rem 5vw;
  position: relative; overflow: hidden;
}
.hero-inner {
  max-width: 1100px; width: 100%; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 420px;
  align-items: center; gap: 5rem;
  position: relative;
}
.hero-left { display: flex; flex-direction: column; gap: 2rem; }
.hero-top  { display: flex; align-items: center; gap: 1.2rem; }
.hero-index { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.hero-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 11px; letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line); border-radius: 100px;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #aaa; }
.hero-status.available .status-dot {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.2); }
  50%      { box-shadow: 0 0 0 7px rgba(74,222,128,0.04); }
}
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  line-height: 0.9; letter-spacing: -0.05em;
  overflow: hidden;
}
.hero-title .line {
  display: block;
  animation: slideUp .9s var(--ease) both;
}
.hero-title .line:nth-child(2) { animation-delay: .08s; }
.hero-title .italic { font-style: italic; color: var(--muted); }
@keyframes slideUp {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.hero-tagline { max-width: 400px; color: var(--muted); line-height: 1.65; font-size: 14px; }
.hero-year {
  position: absolute; right: 0; bottom: 2rem;
  font-size: 11px; letter-spacing: 0.12em; color: var(--line);
  writing-mode: vertical-rl; user-select: none;
}

/* ── PHOTO ── */
.hero-right { display: flex; justify-content: flex-end; }
.hero-photo-wrap {
  position: relative; width: 100%; max-width: 380px;
  animation: fadeIn 1.2s var(--ease) .2s both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.hero-photo {
  width: 100%; aspect-ratio: 3/4;
  object-fit: cover; object-position: top;
  display: block;
  filter: grayscale(15%);
  transition: filter .4s;
}
.hero-photo:hover { filter: grayscale(0%); }

/* Cadre décoratif */
.hero-photo-wrap::before {
  content: '';
  position: absolute; inset: -10px -10px 10px 10px;
  border: 1px solid var(--line);
  z-index: -1;
  pointer-events: none;
}

/* Badge flottant */
.hero-photo-badge {
  position: absolute; bottom: -1rem; left: -1.5rem;
  background: var(--ink); color: var(--bg);
  padding: 1rem 1.4rem;
  display: flex; flex-direction: column;
  gap: 0.1rem;
}
.badge-num {
  font-family: var(--display); font-weight: 800;
  font-size: 2rem; letter-spacing: -0.04em; line-height: 1;
}
.badge-label {
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
}

/* ── RESPONSIVE HERO ── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-right { justify-content: flex-start; }
  .hero-photo-wrap { max-width: 280px; }
}
@media (max-width: 480px) {
  .hero-photo-wrap { max-width: 220px; }
  .hero-photo-badge { left: -0.5rem; }
}

/* ══════════════ ABOUT ══════════════ */
#about { border-top: 1px solid var(--line); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: start;
}
.about-text p {
  color: var(--muted); font-size: 15px;
  line-height: 1.85; margin-bottom: 1.5rem;
}
.about-right { display: flex; flex-direction: column; gap: 3rem; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  padding: 2rem; border: 1px solid var(--line);
}
.stat-value {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: 2.8rem; letter-spacing: -0.04em; line-height: 1;
}
.stat-label {
  display: block; font-size: 11px; letter-spacing: 0.08em;
  color: var(--muted); margin-top: 0.3rem; text-transform: uppercase;
}
.about-info { border-top: 1px solid var(--line); padding-top: 2rem; }
.info-row {
  display: flex; justify-content: space-between;
  padding: 0.65rem 0; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.info-key { color: var(--muted); }
.available-text { color: #4ade80; }
.link-underline {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px; transition: opacity .2s;
}
.link-underline:hover { opacity: 0.5; }

/* ══════════════ PROJECTS ══════════════ */
#projects { border-top: 1px solid var(--line); }
.projects-list { display: flex; flex-direction: column; }
.project-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto 2.5rem;
  align-items: center; gap: 2rem;
  padding: 2.2rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  position: relative;
  transition: padding-left .3s var(--ease);
}
.project-row::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,107,53,0.05);
  opacity: 0; transition: opacity .25s;
}
.project-row:hover { padding-left: 1.8rem; }
.project-row:hover::before { opacity: 1; }
.project-row:hover .project-arrow { transform: translateX(6px); }
.project-num { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; }
.project-title {
  font-family: var(--display); font-weight: 700;
  font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 0.25rem;
}
.project-desc { font-size: 12px; color: var(--muted); max-width: 440px; }
.project-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.tag {
  font-size: 10px; letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line); color: var(--muted);
}
.project-year { font-size: 11px; color: var(--muted); }
.project-arrow { font-size: 1.2rem; transition: transform .3s var(--ease); }

/* ══════════════ SKILLS ══════════════ */
#skills { border-top: 1px solid var(--line); background: var(--ink); color: var(--bg); }
#skills .section-header { border-color: rgba(255,255,255,0.08); }
#skills .section-index   { color: rgba(255,255,255,0.3); }
#skills .section-title   { color: var(--bg); }
.skills-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 3rem;
}
.skill-category {
  font-family: var(--display); font-size: .8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
}
.skill-list { list-style: none; }
.skill-list li {
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6); font-size: 13px;
  transition: color .2s, padding-left .2s;
}
.skill-list li:hover { color: #fff; padding-left: 8px; }

/* ══════════════ CONTACT ══════════════ */
#contact { border-top: 1px solid var(--line); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 5rem;
}
.contact-intro {
  color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 2rem;
}
.contact-email {
  display: inline-block;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px; margin-bottom: 2rem;
  transition: opacity .2s;
}
.contact-email:hover { opacity: 0.55; }
.social-links { display: flex; flex-direction: column; gap: 0.6rem; }
.social-links a {
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.social-links a:hover { color: var(--ink); }
.contact-form { display: flex; flex-direction: column; gap: 1.6rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-group label {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.form-group input,
.form-group textarea {
  background: transparent; border: none;
  border-bottom: 1px solid var(--line);
  padding: .75rem 0;
  font-family: var(--mono); font-size: 14px;
  color: var(--ink); outline: none; resize: none;
  transition: border-color .25s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--ink); }
.form-success {
  padding: .75rem 1rem;
  background: rgba(74,222,128,0.08); border: 1px solid #4ade80;
  color: #16a34a; font-size: 13px;
}
.form-error {
  padding: .75rem 1rem;
  background: rgba(248,113,113,0.08); border: 1px solid #f87171;
  color: #dc2626; font-size: 13px;
}

/* ══════════════ FOOTER ══════════════ */
#footer { border-top: 1px solid var(--line); position: relative; z-index: 1; }
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 1.8rem 5vw;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: var(--display); font-weight: 800;
  font-size: .95rem; letter-spacing: -0.03em;
}
.footer-copy { font-size: 11px; color: var(--muted); }
.footer-socials { display: flex; gap: 1.5rem; }
.footer-socials a {
  font-size: 11px; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none;
  transition: color .2s;
}
.footer-socials a:hover { color: var(--ink); }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }

  .project-row { grid-template-columns: 2.5rem 1fr 2rem; }
  .project-meta { display: none; }

  .hero-bottom { flex-direction: column; align-items: flex-start; }

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

/* ══════════════ HERO ACTIONS ══════════════ */
.hero-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.btn-ghost {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.05em;
  color: var(--muted); text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* ══════════════ TICKER ══════════════ */
.ticker-wrap {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
  background: var(--bg);
}
.ticker-track {
  display: flex; width: max-content;
  animation: ticker 30s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap; padding: 0 0.2rem;
  transition: color .2s;
}
.ticker-item:hover { color: var(--ink); }
.ticker-sep { margin: 0 1rem; color: var(--accent); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.333%); }
}

/* ══════════════ HOME PROJECTS ══════════════ */
#home-projects { border-top: 1px solid var(--line); }
.section-header { position: relative; }
.section-link {
  margin-left: auto;
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none;
  transition: color .2s;
  align-self: center;
}
.section-link:hover { color: var(--ink); }

/* ══════════════ SERVICES ══════════════ */
#home-services {
  border-top: 1px solid var(--line);
  background: var(--ink); color: var(--bg);
}
#home-services .section-header { border-color: rgba(255,255,255,0.08); }
#home-services .section-index  { color: rgba(255,255,255,0.3); }
#home-services .section-title  { color: var(--bg); }

.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
}
.service-card {
  padding: 2.5rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background .25s;
}
.service-card:last-child { border-right: none; }
.service-card:hover { background: rgba(255,255,255,0.04); }
.service-icon {
  display: block; font-size: 1.5rem;
  margin-bottom: 1.5rem; color: var(--accent);
}
.service-title {
  font-family: var(--display); font-weight: 700;
  font-size: 1rem; letter-spacing: -0.02em;
  margin-bottom: 0.8rem; color: var(--bg);
}
.service-desc { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.7; }

/* ══════════════ CTA ══════════════ */
#home-cta {
  border-top: 1px solid var(--line);
  position: relative; z-index: 1; overflow: hidden;
}
.cta-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 7rem 5vw;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem;
}
.cta-label {
  font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.cta-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.04em; line-height: 1;
}

/* ══════════════ PROJECT DETAIL ══════════════ */
#project-detail { border-top: 1px solid var(--line); }

.detail-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-bottom: 4rem;
  transition: color .2s;
}
.detail-back:hover { color: var(--ink); }

/* ── Kicker line ── */
.detail-kicker {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 1.5rem;
}
.detail-num { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.detail-year { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }

/* ── Title ── */
.detail-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.05em; line-height: 0.9;
  margin-bottom: 2rem;
}

/* ── Tags row ── */
.detail-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4rem;
}

/* ── Body ── */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 6rem;
  align-items: start;
}

/* ── Description ── */
.detail-desc {
  font-size: 15px; color: var(--muted);
  line-height: 1.85; margin-bottom: 2rem;
}

/* ── Features ── */
.detail-features-title {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.detail-features-list { margin-bottom: 3rem; }
.detail-feature-item {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.detail-feature-arrow { color: var(--muted); flex-shrink: 0; }

/* ── Sidebar ── */
.detail-sidebar {
  position: sticky; top: 6rem;
}
.detail-info-block {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.detail-info-block:first-child { border-top: 1px solid var(--line); }
.detail-info-label {
  display: block; font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem;
}
.detail-info-val { font-size: 13px; }
.detail-sidebar-cta { margin-top: 2.5rem; }

@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; gap: 3rem; }
  .detail-sidebar { position: static; }
}

/* ══════════════ RESPONSIVE AJOUTS ══════════════ */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card { border-bottom: 1px solid rgba(255,255,255,0.08); }
  .service-card:nth-child(2n) { border-right: none; }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}