.section-bg-wrapper { position: relative; }
.section-bg-wrapper::before { content: ''; position: absolute; inset: 0; background-image: var(--section-bg, none); background-size: cover; background-position: center; background-attachment: fixed; opacity: 0; z-index: 0; }
.section-bg-wrapper.has-bg::before { opacity: 0.12; }
.section-bg-wrapper.has-bg.bg-medium::before { opacity: 0.25; }
.section-bg-wrapper.has-bg.bg-full::before { opacity: 1; }
.section-bg-wrapper.has-bg.bg-full::after { content: ''; position: absolute; inset: 0; background: var(--overlay-color, rgba(253,246,238,0.80)); z-index: 0; }
.section-bg-wrapper > * { position: relative; z-index: 1; }

#hero { min-height: 100vh; display: flex; align-items: center; padding: 8rem 4rem 4rem; position: relative; overflow: hidden; }
.hero-blobs { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); animation: blobFloat 8s ease-in-out infinite alternate; }
.blob-1 { width: 480px; height: 480px; background: rgba(255,107,74,0.18); top: -120px; right: -80px; }
.blob-2 { width: 360px; height: 360px; background: rgba(62,203,160,0.15); bottom: -60px; left: 5%; animation-delay: -2s; }
.blob-3 { width: 300px; height: 300px; background: rgba(247,201,72,0.18); top: 30%; left: 40%; animation-delay: -4s; }
.blob-4 { width: 250px; height: 250px; background: rgba(74,184,240,0.14); bottom: 10%; right: 20%; animation-delay: -1s; }
@keyframes blobFloat { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(30px,20px) scale(1.08); } }
.hero-content { position: relative; z-index: 1; max-width: 860px; }
.hero-chip { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,107,74,0.1); border: 1px solid rgba(255,107,74,0.25); border-radius: 100px; padding: 0.35rem 1rem; font-size: 0.75rem; font-weight: 500; color: var(--coral); margin-bottom: 1.8rem; opacity: 0; animation: fadeUp 0.7s 0.2s forwards; }
.hero-chip::before { content: '\2726'; font-size: 0.6rem; }
.hero-title { font-family: var(--fd); font-size: clamp(3.2rem, 8vw, 7rem); font-weight: 700; line-height: 1.05; margin-bottom: 1.5rem; opacity: 0; animation: fadeUp 0.7s 0.4s forwards; }
.hero-title .line-italic { font-style: italic; color: var(--coral); }
.hero-title .line-outline { -webkit-text-stroke: 2px var(--text); color: transparent; white-space: nowrap; display: block; overflow: hidden; font-size: clamp(1.6rem, 5vw, 4.5rem); }
.hero-desc { font-size: 1rem; color: var(--muted); max-width: 480px; margin-bottom: 2.5rem; opacity: 0; animation: fadeUp 0.7s 0.6s forwards; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; opacity: 0; animation: fadeUp 0.7s 0.8s forwards; }
.btn-primary { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--coral); color: #fff; padding: 0.9rem 2rem; border-radius: 100px; font-size: 0.9rem; font-weight: 500; text-decoration: none; box-shadow: 0 8px 24px rgba(255,107,74,0.35); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s; will-change: transform; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,74,0.45); }
.btn-secondary { font-size: 0.9rem; font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 2px solid var(--border); padding-bottom: 2px; transition: border-color 0.2s, color 0.2s; }
.btn-secondary:hover { border-color: var(--coral); color: var(--coral); }
.hero-badges { position: absolute; right: 4rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1rem; opacity: 0; animation: fadeIn 1s 1.2s forwards; }
.hero-badge { background: #fff; border-radius: 16px; padding: 1rem 1.25rem; box-shadow: 0 8px 32px rgba(0,0,0,0.08); display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; font-weight: 500; width: 220px; }
body.dark .hero-badge { background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.35); color: var(--text); }
body.dark .badge-icon[style*="background:#fff0ec"] { background: rgba(255,107,74,0.15) !important; }
body.dark .badge-icon[style*="background:#ecfaf5"] { background: rgba(62,203,160,0.15) !important; }
body.dark .badge-icon[style*="background:#f0ecff"] { background: rgba(181,123,238,0.15) !important; }
body.dark .lang-pill { background: var(--surface); border-color: var(--border); color: var(--text); }
body.dark .social-link { background: var(--surface); border-color: var(--border); color: var(--text); }
body.dark .contact-email-btn { background: var(--surface); color: var(--text) !important; border: 1px solid var(--border); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.badge-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.4rem; color: var(--muted); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; }
.scroll-dot { width: 6px; height: 20px; border: 1.5px solid var(--muted); border-radius: 3px; display: flex; justify-content: center; padding-top: 3px; }
.scroll-dot::before { content: ''; width: 2px; height: 5px; background: var(--muted); border-radius: 1px; animation: scrollBounce 1.4s infinite; }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(6px); opacity: 0; } }

section { padding: 7rem 4rem; }
.section-header { margin-bottom: 4rem; }
.section-tag { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.75rem; }
.section-tag::before { content: ''; width: 20px; height: 2px; background: var(--coral); border-radius: 1px; }
.section-title { font-family: var(--fd); font-size: clamp(2.2rem, 4vw, 3.8rem); font-weight: 700; line-height: 1.1; }

#about { background: var(--surface); }
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 5rem; align-items: center; }
.about-photo-wrap { position: relative; }
.about-photo { aspect-ratio: 4/5; border-radius: 24px; overflow: hidden; position: relative; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.about-deco { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: var(--sun); top: -30px; right: -30px; z-index: -1; opacity: 0.6; }
.about-deco2 { position: absolute; width: 80px; height: 80px; border-radius: 50%; background: var(--mint); bottom: -20px; left: -20px; z-index: -1; opacity: 0.5; }
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; }
.about-stats { margin: 2rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card { background: var(--bg); border-radius: 16px; padding: 1.2rem; border: 1px solid var(--border); text-align: center; }
.stat-number { font-family: var(--fd); font-size: 2rem; font-weight: 700; color: var(--coral); }
.stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; align-items: flex-start; isolation: isolate; }
.skill-pill { display: inline-flex; height: 32px; perspective: 600px; cursor: default; vertical-align: middle; position: relative; }
.skill-pill-inner { display: inline-flex; position: relative; transform-style: preserve-3d; transition: transform 0.45s cubic-bezier(0.34,1.2,0.64,1); }
.skill-pill:hover .skill-pill-inner { transform: rotateY(180deg); }
.skill-pill-front, .skill-pill-back { display: flex; align-items: center; justify-content: center; padding: 0 0.9rem; height: 32px; border-radius: 100px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.skill-pill-front { background: var(--bg); border: 1px solid var(--border); color: var(--text) !important; }
.skill-pill-back { background: var(--coral); border: 1px solid var(--coral); color: #fff; transform: rotateY(180deg); position: absolute; inset: 0; gap: 0.35rem; }
.back-top { position: fixed; bottom: 2rem; right: 2rem; z-index: 200; width: 28px; height: 28px; border-radius: 50%; background: var(--coral); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; line-height: 1; box-shadow: 0 4px 20px rgba(255,107,74,0.4); opacity: 0; transform: translateY(12px) scale(0.85); transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1); pointer-events: none; }
.back-top.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-top:hover { transform: translateY(-3px) scale(1.08); box-shadow: 0 8px 28px rgba(255,107,74,0.5); }
.interests-section { margin-top: 2rem; }
.interests-title { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.9rem; }
.interests { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.interest-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 0.6rem 1rem; font-size: 0.82rem; font-weight: 500; display: flex; align-items: center; gap: 0.5rem; transition: transform 0.2s, box-shadow 0.2s; }
.interest-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.5rem; }
.project-card { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; position: relative; transform-style: preserve-3d; will-change: transform; }
.project-card:hover { box-shadow: 0 20px 48px rgba(0,0,0,0.12); }
.project-card::after { content: ''; position: absolute; inset: 0; border-radius: 20px; background: radial-gradient(circle at var(--halo-x, 50%) var(--halo-y, 50%), rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 35%, transparent 65%); opacity: 0; transition: opacity 0.3s; pointer-events: none; z-index: 2; }
.project-card:hover::after { opacity: 1; }
.project-thumb { height: 200px; display: grid; place-items: center; overflow: hidden; }
.project-thumb--logo { padding: 2rem; }
.project-logo { max-width: 100%; max-height: 140px; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.08)); transition: transform 0.3s; }
.project-card:hover .project-logo { transform: scale(1.05); }
.project-emoji { font-size: 3rem; }
.project-body { padding: 1.5rem; }
.project-tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.project-title { font-family: var(--fd); font-size: 1.5rem; font-weight: 700; margin-bottom: 0.6rem; }
.project-desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; }
.project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.2rem; }
.stack-tag { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0.2rem 0.55rem; font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.project-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 500; text-decoration: none; transition: gap 0.2s; }
.project-link:hover { gap: 0.7rem; }
.project-card-hint { position: absolute; bottom: 1rem; right: 1rem; padding: 0.3rem 0.8rem; border-radius: 100px; border: 1.5px solid var(--border); font-size: 0.72rem; font-weight: 500; color: var(--muted); opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s, border-color 0.2s, color 0.2s; pointer-events: none; background: var(--bg); }
.project-card:hover .project-card-hint { opacity: 1; transform: translateY(0); border-color: var(--coral); color: var(--coral); }

#experience { background: var(--surface); }
.parcours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.col-title { font-family: var(--fd); font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--border); }
.col-cards { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-card { background: #fff; border-radius: 20px; padding: 2rem; border: 1px solid var(--border); position: relative; overflow: hidden; opacity: 0; transform: translateY(20px); transition: opacity 0.5s, transform 0.5s, box-shadow 0.3s; }
.timeline-card:hover { box-shadow: 0 12px 36px rgba(0,0,0,0.07); }
.timeline-card.visible { opacity: 1; transform: translateY(0); }
.timeline-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--card-color, var(--coral)); border-radius: 20px 20px 0 0; }
body.dark .timeline-card { background: var(--surface); }
body.dark .project-card { background: var(--surface); color: var(--text); }
body.dark .project-card .project-title { color: var(--text); }
body.dark .project-card .project-desc { color: var(--muted); }
body.dark .project-card .stack-tag { background: var(--bg); border-color: var(--border); color: var(--text); }
.timeline-date { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 0.5rem; }
.timeline-role { font-family: var(--fd); font-size: 1.3rem; font-weight: 700; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; }
.timeline-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }
.lang-pills { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.lang-pill { display: flex; align-items: center; gap: 0.5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 100px; padding: 0.4rem 1rem; font-size: 0.82rem; font-weight: 500; }
.lang-level { font-size: 0.7rem; color: var(--muted); }

.nav-links a.active { color: var(--coral); }
.nav-links a.active::after { width: 100%; }
.nav-links a.active::before { content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background: var(--coral); border-radius: 50%; opacity: 0.7; }

.contact-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cf-group { display: flex; flex-direction: column; gap: 0.4rem; }
.cf-label { font-size: 0.75rem; font-weight: 500; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.cf-input { width: 100%; padding: 0.85rem 1.1rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; font-family: var(--fb); font-size: 0.9rem; color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.cf-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,107,74,0.1); }
.cf-textarea { resize: vertical; min-height: 130px; }
.cf-submit { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; background: var(--text); color: var(--bg); padding: 0.95rem 2.2rem; border-radius: 100px; font-family: var(--fb); font-size: 0.95rem; font-weight: 500; border: none; cursor: pointer; box-shadow: 0 8px 32px rgba(26,20,16,0.15); transition: transform 0.2s, box-shadow 0.2s; align-self: center; }
.cf-submit:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(26,20,16,0.2); }
.cf-submit:disabled { opacity: 0.6; cursor: default; }
.cf-status { text-align: center; font-size: 0.85rem; font-weight: 500; padding: 0.75rem 1.2rem; border-radius: 12px; display: none; }
.cf-status.success { background: rgba(62,203,160,0.12); color: var(--mint); border: 1px solid rgba(62,203,160,0.25); display: block; }
.cf-status.error { background: rgba(255,107,74,0.1); color: var(--coral); border: 1px solid rgba(255,107,74,0.2); display: block; }
body.dark .cf-input { background: var(--surface); }
body.dark .cf-submit { background: var(--text); color: var(--bg); }

#contact { text-align: center; position: relative; overflow: hidden; }
.contact-blobs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.contact-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.contact-big { font-family: var(--fd); font-size: clamp(2.8rem, 6vw, 5.5rem); font-weight: 700; line-height: 1.1; margin-bottom: 1.2rem; }
.contact-big em { font-style: italic; color: var(--coral); }
.contact-sub { font-size: 1rem; color: var(--muted); margin-bottom: 2.5rem; }
.contact-email-btn { display: inline-flex; align-items: center; gap: 0.75rem; background: var(--text); color: var(--bg); padding: 1rem 2.2rem; border-radius: 100px; font-size: 0.95rem; font-weight: 500; text-decoration: none; box-shadow: 0 8px 32px rgba(26,20,16,0.2); transition: transform 0.2s, box-shadow 0.2s; }
.contact-email-btn:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(26,20,16,0.25); }
.social-link { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; border: 1px solid var(--border); border-radius: 100px; padding: 0.5rem 1.1rem; font-size: 0.8rem; font-weight: 500; color: var(--text); text-decoration: none; transition: border-color 0.2s, color 0.2s, transform 0.2s; }
.socials { margin-top: 2.5rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.social-link:hover { border-color: currentColor; transform: translateY(-2px); }
.social-link.li:hover { color: #0a66c2; }
.social-link.mail:hover { color: var(--coral); }

.footer-bar { border-top: 1px solid var(--border); background: var(--surface); padding: 1rem 4rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; }
.footer-bar > span,
.footer-bar > span a { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 680px) {
  .footer-bar { padding: 1rem 1.5rem; flex-direction: column; text-align: center; gap: 0.6rem; }
  .footer-bar > span { line-height: 1.6; }
}
.footer-copy { font-size: 0.78rem; color: var(--muted); }
.footer-meta { display: flex; align-items: center; gap: 1.5rem; }
.footer-weather { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--muted); }
.footer-visitors { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.footer-visitors span.count { color: var(--coral); font-weight: 600; }

#splash { position: fixed; inset: 0; z-index: 999999; background: #0e0c0a; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1); }
#splash.hide { opacity: 0; pointer-events: none; transform: scale(1.04); }
.splash-monogram { position: relative; width: 160px; height: 160px; }
.splash-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255,107,74,0.25); animation: splash-pulse 2.5s ease-in-out infinite; }
.splash-ring:nth-child(2) { inset: -22px; animation-delay: 0.4s; border-color: rgba(255,107,74,0.12); }
.splash-ring:nth-child(3) { inset: -44px; animation-delay: 0.8s; border-color: rgba(255,107,74,0.05); }
@keyframes splash-pulse { 0%,100% { transform: scale(1); opacity:1; } 50% { transform: scale(1.04); opacity:0.5; } }
.splash-letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 8rem; font-weight: 300; font-style: italic; line-height: 1; color: #ff6b4a; filter: drop-shadow(0 0 48px rgba(255,107,74,0.45)); animation: splash-fadein 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes splash-fadein { from { opacity:0; transform:translateY(16px) scale(0.92); } to { opacity:1; transform:translateY(0) scale(1); } }
.splash-bar-wrap { margin-top: 3.5rem; width: 120px; height: 1px; background: rgba(255,255,255,0.08); border-radius: 1px; overflow: hidden; }
.splash-bar { height: 100%; width: 0%; background: linear-gradient(90deg, #ff6b4a, #ffaa72); border-radius: 1px; transition: width 1.4s cubic-bezier(0.4,0,0.2,1); }
.splash-name { margin-top: 1.2rem; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.3); animation: splash-fadein 0.5s 0.2s ease both; }

#project-modal-overlay { position: fixed; inset: 0; z-index: 99990; background: rgba(10,8,6,0); backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); pointer-events: none; transition: background 0.45s, backdrop-filter 0.45s, -webkit-backdrop-filter 0.45s; display: flex; align-items: center; justify-content: center; padding: 2rem; }
#project-modal-overlay.open { background: rgba(10,8,6,0.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: auto; }
#project-modal { background: var(--bg); border: 1px solid var(--border); border-radius: 24px; max-width: 620px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
#project-modal-overlay.open #project-modal { opacity: 1; pointer-events: auto; }
.modal-clone { position: fixed; z-index: 99995; overflow: hidden; pointer-events: none; background: var(--bg); border: 1px solid var(--border); will-change: transform, border-radius; transition: none; }
.modal-clone.animating { transition: top 0.45s cubic-bezier(0.32,0.72,0,1), left 0.45s cubic-bezier(0.32,0.72,0,1), width 0.45s cubic-bezier(0.32,0.72,0,1), height 0.45s cubic-bezier(0.32,0.72,0,1), border-radius 0.45s cubic-bezier(0.32,0.72,0,1); }
.modal-clone.closing { transition: top 0.38s cubic-bezier(0.32,0.72,0,1), left 0.38s cubic-bezier(0.32,0.72,0,1), width 0.38s cubic-bezier(0.32,0.72,0,1), height 0.38s cubic-bezier(0.32,0.72,0,1), border-radius 0.38s cubic-bezier(0.32,0.72,0,1); }
.modal-thumb { width: 100%; height: 200px; display: grid; place-items: center; border-radius: 24px 24px 0 0; overflow: hidden; }
.modal-thumb img { max-height: 130px; max-width: 60%; object-fit: contain; }
.modal-body { padding: 2rem; }
.modal-tag { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.modal-title { font-family: var(--fd); font-size: 2rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.2; }
.modal-desc p { font-size: 0.9rem; color: var(--muted); line-height: 1.8; margin-bottom: 0.8rem; }
.modal-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: 1rem; color: var(--muted); display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; z-index: 2; }
.modal-close:hover { background: var(--coral); color: #fff; border-color: var(--coral); }
.modal-link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: gap 0.2s; }
.modal-link:hover { gap: 0.8rem; }

#terminal-section { background: #0e0c0a; padding: 5rem 4rem; }
.terminal-wrap { max-width: 720px; margin: 0 auto; }
.terminal-header-bar { background: #1a1714; border-radius: 14px 14px 0 0; padding: 0.75rem 1.2rem; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid #2a2420; }
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot.red { background: #ff5f57; } .t-dot.yellow { background: #febc2e; } .t-dot.green { background: #28c840; }
.t-title { font-size: 0.72rem; color: #6a5a4a; margin-left: auto; margin-right: auto; font-family: monospace; letter-spacing: 0.1em; }
.terminal-body { background: #0e0c0a; border-radius: 0 0 14px 14px; padding: 1.5rem; font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace; font-size: 0.82rem; line-height: 1.7; min-height: 320px; max-height: 480px; overflow-y: auto; border: 1px solid #2a2420; border-top: none; }
.t-line { display: flex; gap: 0.5rem; margin-bottom: 0.1rem; }
.t-prompt { color: #3ecba0; white-space: nowrap; }
.t-cmd { color: #f0e8df; }
.t-output { color: #8a7a6a; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.t-output .hl { color: #ff6b4a; font-weight: 600; }
.t-output .hl-mint { color: #3ecba0; }
.t-output .hl-sky { color: #4ab8f0; }
.t-output .hl-lav { color: #b57bee; }
.t-input-line { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.t-cursor { display: inline-block; width: 8px; height: 1.1em; background: #3ecba0; animation: blink 1s step-end infinite; vertical-align: text-bottom; }
#t-input { background: none; border: none; outline: none; color: #f0e8df; font-family: inherit; font-size: inherit; flex: 1; caret-color: transparent; }
.terminal-hint { text-align: center; font-size: 0.72rem; color: #3a3028; margin-top: 0.75rem; font-family: monospace; letter-spacing: 0.08em; }
.terminal-section-label { font-family: var(--fd); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700; color: #fff; text-align: center; margin-bottom: 0.5rem; }
.terminal-section-label em { color: var(--coral); font-style: italic; }
.terminal-section-sub { text-align: center; color: #6a5a4a; font-size: 0.88rem; margin-bottom: 2rem; }

.timeline-alt { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline-alt::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, transparent, var(--border) 5%, var(--border) 95%, transparent); transform: translateX(-50%); }
.tl-item { display: grid; grid-template-columns: 1fr 60px 1fr; align-items: start; gap: 0; margin-bottom: 2.5rem; }
.tl-item.left .tl-card-wrap { grid-column: 1; padding-right: 2rem; }
.tl-item.left .tl-dot-wrap { grid-column: 2; }
.tl-item.left .tl-empty { grid-column: 3; }
.tl-item.right .tl-empty { grid-column: 1; }
.tl-item.right .tl-dot-wrap { grid-column: 2; }
.tl-item.right .tl-card-wrap { grid-column: 3; padding-left: 2rem; }
.tl-dot-wrap { display: flex; justify-content: center; padding-top: 1.5rem; z-index: 2; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--card-color, var(--coral)); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--card-color, var(--coral)); transition: box-shadow 0.3s; }
.tl-item:hover .tl-dot { box-shadow: 0 0 0 5px rgba(255,107,74,0.2), 0 0 16px var(--card-color, var(--coral)); }
.tl-card-wrap { opacity: 0; transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.tl-item.left .tl-card-wrap { transform: translateX(-40px); }
.tl-item.right .tl-card-wrap { transform: translateX(40px); }
.tl-card-wrap.visible { opacity: 1; transform: translateX(0) !important; }
@media(max-width:768px) {
  .timeline-alt::before { left: 20px; }
  .tl-item { grid-template-columns: 40px 1fr; }
  .tl-item.left .tl-card-wrap, .tl-item.right .tl-card-wrap { grid-column: 2; grid-row: 1; padding: 0 0 0 1rem; transform: translateX(20px); }
  .tl-item.left .tl-dot-wrap, .tl-item.right .tl-dot-wrap { grid-column: 1; grid-row: 1; }
  .tl-item.left .tl-empty, .tl-item.right .tl-empty { display: none; }
}

.typewriter-cursor { display: inline-block; width: 3px; height: 0.85em; background: var(--coral); margin-left: 3px; vertical-align: middle; border-radius: 2px; animation: blink 0.9s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }
[data-fr], [data-en] { transition: opacity 0.2s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1), transform 0.65s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-group > *:nth-child(1) { transition-delay: 0s; }
.reveal-group > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-group > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-group > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-group > *:nth-child(7) { transition-delay: 0.48s; }

#read-progress { position: fixed; top: 0; left: 0; z-index: 99998; height: 2px; width: 0%; background: linear-gradient(90deg, var(--coral), var(--peach)); transition: width 0.1s linear; pointer-events: none; }

@media(max-width:680px) {
  section { padding: 5rem 1.5rem; }
  #hero { padding: 6rem 1.5rem 4rem; }
  .hero-badges { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .parcours-grid { grid-template-columns: 1fr; }
  #project-modal-overlay { padding: 1rem; }
  .modal-title { font-size: 1.5rem; }
}

@media(max-width:900px) {
  .hero-badges { display: none; }
}

@media(max-width:600px) {
  .contact-form-row { grid-template-columns: 1fr; }
}
