/* ========= VARIABLES (faciles à modifier) ========= */
:root {
    --bg: #050816;
    --bg-alt: #0b1020;
    --accent: #7c3aed;
    --accent-soft: rgba(124, 58, 237, 0.15);
    --text: #f9fafb;
    --muted: #9ca3af;
    --card: #111827;
    --border: #1f2933;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.45);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition-fast: 180ms ease-out;
}

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

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #1f2937 0, #020617 45%, #000 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 10%, #facc15, #f97316, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.9);
}

nav {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
}

nav a {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    transition: border-color var(--transition-fast),
    color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

nav a:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

/* ========= HERO ========= */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
    gap: 40px;
    align-items: center;
    padding: 28px 20px;
    margin-bottom: 40px;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.18),
        rgba(15, 23, 42, 0.95)
    ),
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.35), transparent 60%);
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.25);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 0, #64748b 0, transparent 35%),
    radial-gradient(circle at 80% 100%, #4c1d95 0, transparent 40%);
    opacity: 0.35;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.hero-left {
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.85);
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.hero-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

.hero-title {
    font-size: clamp(2.2rem, 3.2vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-title span {
    background: linear-gradient(135deg, #a855f7, #22d3ee);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: var(--muted);
    margin-bottom: 18px;
    max-width: 30rem;
    font-size: 0.98rem;
}

.hero-subtitle strong {
    color: #e5e7eb;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid;
    cursor: pointer;
    transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #22d3ee);
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.7);
}

.btn-primary:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 15px 34px rgba(15, 23, 42, 0.9);
}

.btn-ghost {
    border-color: rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: var(--muted);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.95);
    color: var(--text);
    border-color: var(--accent);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(6px);
}

.meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22d3ee;
}

.hero-right {
    position: relative;
    z-index: 1;
    justify-self: center;
}

.screen {
    position: relative;
    width: 100%;
    max-width: 330px;
    aspect-ratio: 4 / 3;
    background: radial-gradient(circle at top, #1f2937, #020617 60%);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: var(--shadow-soft);
    padding: 16px 14px 18px;
    overflow: hidden;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.7rem;
    color: var(--muted);
}

.screen-dots {
    display: inline-flex;
    gap: 5px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.dot.red {
    background: #f97373;
}

.dot.yellow {
    background: #facc15;
}

.dot.green {
    background: #22c55e;
}

.screen-title {
    font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.screen-body {
    position: relative;
    height: 100%;
    border-radius: 16px;
    background: radial-gradient(circle at 15% 0, #22d3ee 0, transparent 35%),
    radial-gradient(circle at 85% 100%, #7c3aed 0, transparent 35%),
    radial-gradient(circle at 50% 50%, #0f172a 0, #020617 50%);
    overflow: hidden;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.75rem;
}

.hud-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #e5e7eb;
}

.hud-label {
    font-family: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
    font-size: 0.7rem;
    color: #a5b4fc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hud-value {
    font-weight: 600;
}

.screen-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.bar {
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #22c55e, #facc15);
    width: 80%;
}

.bar-fill.mid {
    width: 65%;
    background: linear-gradient(90deg, #2dd4bf, #6366f1);
}

.bar-fill.low {
    width: 45%;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.code-window {
    margin-top: auto;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
    font-size: 0.7rem;
    color: #e5e7eb;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.8);
}

.code-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.code-keyword {
    color: #fb7185;
}

.code-fn {
    color: #facc15;
}

.code-prop {
    color: #38bdf8;
}

.code-value {
    color: #a5b4fc;
}

/* ========= SECTION GENERIC ========= */
section {
    margin-bottom: 40px;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin-bottom: 6px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ========= À PROPOS ========= */
.about {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
    align-items: start;
}

.about-text {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    font-size: 0.92rem;
    color: var(--muted);
}

.about-text p + p {
    margin-top: 10px;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pill {
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: #e5e7eb;
}

.about-meta {
    display: grid;
    gap: 10px;
}

.stat-card {
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text);
}

/* ========= PROJETS ========= */
.projects-grid {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Optionnel : style discret pour la barre de défilement */
.projects-grid::-webkit-scrollbar {
    height: 6px;
}
.projects-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.9);
}
.projects-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.8);
    border-radius: 999px;
}

.project-card {
    min-width: 260px; /* largeur mini pour chaque carte */
    max-width: 320px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.65);
    transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(circle at 90% 100%, rgba(244, 114, 182, 0.1), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
    border-color: rgba(124, 58, 237, 0.8);
    background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.98),
    rgba(30, 64, 175, 0.98)
    );
}

.project-card:hover::before {
    opacity: 1;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.project-title {
    font-weight: 600;
    font-size: 0.98rem;
}

.project-tag {
    font-size: 0.7rem;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.95);
}

.project-desc {
    font-size: 0.86rem;
    color: var(--muted);
}

.project-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.76rem;
    color: var(--muted);
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tech {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.9);
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-link {
    font-size: 0.76rem;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    opacity: 0.9;
}

.project-link:hover {
    opacity: 1;
}

/* ========= COMPÉTENCES ========= */
.skills-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.skills-grid::-webkit-scrollbar {
    height: 6px;
}
.skills-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.9);
}
.skills-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.8);
    border-radius: 999px;
}

.skill-card {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 12px 14px 10px;
    border: 1px solid var(--border);
    font-size: 0.86rem;
    min-width: 240px;
    max-width: 320px;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.skill-card h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.skill-tag {
    font-size: 0.74rem;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px dashed rgba(148, 163, 184, 0.7);
    color: var(--muted);
}

/* ========= CONTACT ========= */
.contact-card {
    background: radial-gradient(circle at top left, #1d2233, #020617 65%);
    border-radius: var(--radius-xl);
    padding: 18px 18px 14px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 18px;
    align-items: center;
}

.contact-text {
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.contact-chip {
    font-size: 0.8rem;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast);
}

.contact-chip:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
}

footer {
    margin-top: 28px;
    font-size: 0.78rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid rgba(30, 64, 175, 0.7);
    padding-top: 10px;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 840px) {
    .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px;
    }

    .hero-right {
    order: -1;
    }

    .about {
    grid-template-columns: minmax(0, 1fr);
    }

    .contact-card {
    grid-template-columns: minmax(0, 1fr);
    }

    .contact-links {
    justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    header {
    flex-direction: column;
    align-items: flex-start;
    }

    nav {
    flex-wrap: wrap;
    }

    .page {
    padding-inline: 14px;
    }
}