/* ========================
   ROOT & RESET
======================== */
:root {
    --bg: #0c0c0e;
    --bg-light: #f5f3ef;
    --surface: rgba(255,255,255,0.04);
    --surface-light: rgba(255,255,255,0.9);
    --accent: #d4ff57;
    --accent-dark: #a8cc2a;
    --text: #e8e6e1;
    --text-muted: #6b6b72;
    --text-dark: #1a1a1e;
    --border: rgba(255,255,255,0.08);
    --border-light: rgba(0,0,0,0.08);
    --radius: 16px;
    --radius-sm: 8px;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'DM Mono', monospace;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

/* ========================
   CUSTOM CURSOR
======================== */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, opacity 0.3s ease;
}

.cursor-follower {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: left 0.15s ease, top 0.15s ease, transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
}

body:hover .cursor { opacity: 1; }
a:hover ~ .cursor, a:hover .cursor { transform: translate(-50%, -50%) scale(2.5); }

/* ========================
   NAVIGATION
======================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(12,12,14,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color var(--transition);
}

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

.nav-links .nav-cta {
    background: var(--accent);
    color: var(--bg) !important;
    padding: 8px 18px;
    border-radius: 100px;
    font-weight: 700;
}

.nav-links .nav-cta:hover {
    background: var(--accent-dark);
}

/* ========================
   HERO
======================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 140px 80px 80px;
    overflow: hidden;
    background: var(--bg);
}

.hero-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,255,87,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212,255,87,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding: 6px 14px;
    border: 1px solid rgba(212,255,87,0.3);
    border-radius: 100px;
    animation: fadeIn 1s ease forwards;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.reveal-line {
    display: block;
    overflow: hidden;
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

.reveal-line:nth-child(1) { animation-delay: 0.2s; }
.reveal-line:nth-child(2) { animation-delay: 0.35s; }

.reveal-line.accent { color: var(--accent); }

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

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

.hero-sub {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    animation: fadeIn 1s 0.6s ease forwards;
    opacity: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 80px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

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

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    animation: scrollAnim 2s ease infinite;
}

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

.hero-aside {
    position: absolute;
    right: 80px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1;
}

.hero-stat {
    text-align: right;
    border-right: 2px solid var(--border);
    padding-right: 20px;
}

.stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ========================
   SECTIONS
======================== */
.section {
    padding: 100px 80px;
    background: var(--bg);
}

.section-dark {
    background: #0a0a0c;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 56px;
}

.section-index {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

/* ========================
   GLASS CARDS
======================== */
.card-glass {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    transition: border-color var(--transition), transform var(--transition);
}

.card-glass:hover {
    border-color: rgba(212,255,87,0.2);
    transform: translateY(-2px);
}

/* ========================
   ABOUT
======================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.about-text {
    padding: 36px;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong { color: var(--text); }

.about-badge {
    padding: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.badge-icon { font-size: 2.5rem; }

.about-badge strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.about-badge p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* ========================
   TIMELINE
======================== */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 12px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.timeline-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: border-color var(--transition);
}

.timeline-card:hover {
    border-color: rgba(212,255,87,0.2);
}

.timeline-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(212,255,87,0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.timeline-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.timeline-card ul {
    list-style: none;
    padding: 0;
}

.timeline-card ul li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.timeline-card ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.5;
}

/* ========================
   STAGES / DIPLOMES
======================== */
.parcours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.parcours-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.stage-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stage-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.stage-year {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    min-width: 36px;
}

.stage-card strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    display: block;
}

.stage-duration {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.diplome-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.diplome-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.diplome-icon { font-size: 2rem; flex-shrink: 0; }

.diplome-card strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
}

.diplome-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.diplome-card em {
    color: var(--accent);
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ========================
   SKILLS
======================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
    cursor: default;
    opacity: 0;
    transform: translateY(20px);
}

.skill-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-item:hover {
    background: rgba(212,255,87,0.06);
    border-color: rgba(212,255,87,0.3);
    transform: translateY(-4px);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.skill-item span {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--text);
}

/* ========================
   CONTACT
======================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 32px;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color var(--transition);
}

.contact-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-icon { font-size: 1.8rem; flex-shrink: 0; }

.contact-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.contact-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: color var(--transition);
}

.contact-item:hover .contact-value { color: var(--accent); }

/* ========================
   FOOTER
======================== */
.footer {
    padding: 40px 80px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

.footer p {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-sub {
    opacity: 0.5;
}

/* ========================
   REVEAL ANIMATION
======================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   RESPONSIVE
======================== */
@media (max-width: 900px) {
    .nav { padding: 16px 24px; }
    .nav-links { display: none; }
    .hero { padding: 120px 32px 80px; }
    .hero-aside { display: none; }
    .hero-scroll { left: 32px; }
    .section { padding: 72px 32px; }
    .about-grid { grid-template-columns: 1fr; }
    .about-badge { display: none; }
    .parcours-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer { padding: 32px; flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 500px) {
    .hero-title { font-size: 3.5rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
}
