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

:root {
    --bg: #0a0a0a;
    --bg-2: #111111;
    --border: #1e1e1e;
    --text: #d4d4d4;
    --text-muted: #bbb;
    --accent: #00ff88;
    --sidebar-w: 260px;
    --font-mono: "Space Mono", monospace;
    --font-display: "DM Sans", sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.25rem;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 40px 28px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
}

.sidebar__tag {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    letter-spacing: 0.1em;
}

.sidebar__name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 800;
    color: #fff;
    margin-top: 8px;
    line-height: 1.2;
}

.sidebar__role {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.sidebar__identity {
    margin-bottom: 48px;
}

/* Nav */
.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    letter-spacing: 0.08em;
    transition: color 0.2s, background 0.2s;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--text);
    background: var(--border);
}

.nav-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(0, 255, 136, 0.04);
}

/* Footer sidebar */
.sidebar__footer {
    margin-top: auto;
}

.sidebar__status {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Content */
.content {
    margin-left: var(--sidebar-w);
    padding: 80px 64px;
    flex: 1;
}

/* Hero */
.hero__intro {
    font-size: var(--text-base);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.hero__name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 28px;
}

.hero__desc {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Button */
.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 12px 24px;
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: background 0.2s, color 0.2s;
}

.btn:hover {
    background: var(--accent);
    color: #000;
}

/* Page générique */
.page__tag {
    font-size: var(--text-base);
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.page__title {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 20px;
}

.page__desc {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.8;
}

/* Home sections */
.home-section {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.home-bio {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.9;
}

/* Stack */
.stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.stack-item {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--accent);
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 6px 14px;
    letter-spacing: 0.06em;
}

/* Project card */
.project-card {
    margin-top: 20px;
    border: 1px solid var(--border);
    padding: 24px 28px;
    transition: border-color 0.2s;
}

.project-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
}

.project-card__header {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 12px;
}

.project-card__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
}

.project-card__tech {
    font-size: var(--text-m);
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.project-card__desc {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-card__links {
    display: flex;
    gap: 24px;
}

.project-link {
    font-size: var(--text-sm);
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: opacity 0.2s;
}

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

.project-link.muted {
    color: var(--text-muted);
}

/* CV */
.cv-actions {
    display: flex;
    gap: 16px;
    margin: 32px 0;
}

.cv-text {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.9;
}

.btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn--ghost:hover {
    background: var(--border);
    color: var(--text);
}

.cv-embed {
    border: 1px solid var(--border);
    margin-top: 48px;
}

.cv-embed iframe {
    display: block;
    border: none;
    background: #fff;
}

/* CV codé */
.cv {
    margin-top: 80px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.cv-header {
    margin-bottom: 56px;
}

.cv-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
}

.cv-title {
    font-size: var(--text-sm);
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.cv-contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: var(--text-sm);
}

.cv-contact-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.cv-contact-link:hover {
    color: var(--accent);
}

.cv-contact-text {
    color: var(--text-muted);
}

.cv-sep {
    color: var(--border);
}

/* Body layout */
.cv-body {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 64px;
    align-items: start;
}

/* Section */
.cv-section {
    margin-bottom: 48px;
}

.cv-section .page__tag {
    margin-bottom: 24px;
}

/* Job */
.cv-job {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.cv-job:last-child {
    border-bottom: none;
}

.cv-job__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.cv-job__company {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.cv-job__role {
    font-size: var(--text-sm);
    color: var(--accent);
    letter-spacing: 0.05em;
}

.cv-job__date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.cv-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cv-list li {
    font-size: var(--text-lg);
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
    line-height: 1.7;
}

.cv-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: var(--text-xs);
}

/* Formation */
.cv-edu {
    display: flex;
    gap: 20px;
    align-items: baseline;
    margin-bottom: 12px;
}

.cv-edu__year {
    font-size: var(--text-xs);
    color: var(--accent);
    letter-spacing: 0.08em;
    min-width: 36px;
}

.cv-edu__label {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Aside */
.cv-aside {
    position: sticky;
    top: 40px;
}

.cv-aside .cv-section {
    margin-bottom: 36px;
}

.cv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-top: 40px;
}

.skill-block__title {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* Contact */
.contact-layout {
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.contact-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-width: 120px;
}

.contact-link {
    font-size: var(--text-base);
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-input {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: var(--text-base);
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.form-feedback {
    font-size: var(--text-base);
    padding: 12px 16px;
    margin-bottom: 24px;
    border-left: 2px solid;
}

.form-feedback--success {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 255, 136, 0.04);
}

.form-feedback--error {
    color: #ff4d4d;
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.04);
}

/* NASA APOD */
.apod-date-form {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 32px 0 48px;
}

.apod-date-input {
    width: auto;
    color-scheme: dark;
}

.apod {
    max-width: 800px;
}

.apod__meta {
    display: flex;
    gap: 20px;
    align-items: baseline;
    margin-bottom: 12px;
}

.apod__date {
    font-size: var(--text-xs);
    color: var(--accent);
    letter-spacing: 0.1em;
}

.apod__copyright {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.apod__title {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    line-height: 1.2;
}

.apod__img {
    width: 100%;
    display: block;
    border: 1px solid var(--border);
    margin-bottom: 28px;
    transition: opacity 0.2s;
}

.apod__img:hover {
    opacity: 0.9;
}

.apod__video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.apod__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.apod__explanation {
    font-size: var(--text-lg);
    color: var(--text-muted);
    line-height: 1.9;
}

.apod-date-form .btn {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}

.apod-date-form .btn:hover {
    background: var(--accent);
    color: #000;
}

.apod-hint {
    font-size: var(--text-base);
    font-size: var(--text-base);
    color: var(--text);
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.bio-quote {
    margin-top: 28px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
    font-size: var(--text-base);
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.8;
}

.bio-quote cite {
    display: block;
    margin-top: 8px;
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--accent);
    letter-spacing: 0.08em;
}

/* Burger button */
.burger {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--bg-2);
    border: 1px solid var(--border);
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    justify-content: center;
    align-items: center;
}

.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent);
    transition: transform 0.25s, opacity 0.25s;
}

/* Croix quand ouvert */
.burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
    opacity: 0;
}
.burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

.sidebar-overlay.visible {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 72px 24px 48px;
    }
}

.badge-new {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    background: #C9A84C;
    color: #fff;
    padding: 2px 6px;
    vertical-align: middle;
    margin-left: 8px;
}