/* Layout: deep-space stage, same family as the digital CV —
   cinematic hero with a live 3D Earth, wide glass showcases. */

:root {
    --bg: #03060c;
    --bg-raised: #070d18;
    --glass: rgba(14, 24, 42, 0.55);
    --glass-strong: rgba(14, 24, 42, 0.78);
    --line: rgba(160, 190, 230, 0.14);
    --line-strong: rgba(160, 190, 230, 0.32);
    --text: #f3f6fb;
    --text-soft: #b8c4d4;
    --text-muted: #7f8ca0;
    --accent: #9fc3ff;
    --accent-strong: #5fa8ff;
    --glow: #7c5cff;
    --ok: #6fe3a0;

    --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

    --radius: 22px;
    --radius-small: 14px;
    --max: 1180px;

    color-scheme: dark;
}


/* ---------- base ---------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.game-open {
    overflow: hidden;
}

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

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

button {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    text-wrap: balance;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

.wrap {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: 20px;
}


/* ---------- space background ---------- */

#stars {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.space-photo {
    position: fixed;
    inset: -4%;
    z-index: 0;
    pointer-events: none;
    background: url("assets/img/nebula.jpg") center / cover no-repeat;
    opacity: 0.32;
    filter: saturate(1.15);
    animation: drift 90s ease-in-out infinite alternate;
}

@keyframes drift {
    to {
        transform: scale(1.08) translate(-1.5%, 1%);
    }
}

#galaxy {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Keeps text readable over the bright galaxy core. */
.galaxy-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3, 6, 12, 0.72) 0%, rgba(3, 6, 12, 0.35) 45%, rgba(3, 6, 12, 0.1) 75%),
        linear-gradient(180deg, transparent 60%, rgba(3, 6, 12, 0.55));
}

.aurora {
    position: fixed;
    inset: -20% -10% auto;
    height: 90vh;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(40% 50% at 78% 30%, rgba(95, 168, 255, 0.18), transparent 70%),
        radial-gradient(35% 45% at 18% 10%, rgba(124, 92, 255, 0.16), transparent 70%);
    filter: blur(10px);
}

main,
.nav,
footer {
    position: relative;
    z-index: 2;
}


/* ---------- nav ---------- */

.nav {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 30;
    padding-block: 14px;
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    background: linear-gradient(rgba(3, 6, 12, 0.85), rgba(3, 6, 12, 0.55));
    border-bottom: 1px solid var(--line);
}

.nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: linear-gradient(145deg, rgba(95, 168, 255, 0.25), rgba(124, 92, 255, 0.15));
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 28px;
    font-size: 0.88rem;
    color: var(--text-soft);
}

.nav-links a {
    position: relative;
    padding-block: 4px;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

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

.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-toggle span {
    position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
}

.nav-toggle span::before {
    top: -6px;
}

.nav-toggle span::after {
    top: 6px;
}

.nav.open .nav-toggle span {
    background: transparent;
}

.nav.open .nav-toggle span::before {
    transform: translateY(6px) rotate(45deg);
}

.nav.open .nav-toggle span::after {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nav-links-cv {
    display: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.lang button {
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.lang button[aria-pressed="true"] {
    background: var(--text);
    color: var(--bg);
}


/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(159, 195, 255, 0.08);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #ffffff, #cfe0ff);
    color: #04101f;
    box-shadow: 0 10px 30px -10px rgba(159, 195, 255, 0.55);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffffff, #e2ecff);
    box-shadow: 0 14px 40px -10px rgba(159, 195, 255, 0.75);
}

.btn-small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 0.82rem;
}


/* ---------- hero ---------- */

.hero {
    padding-block: 72px 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--glass);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 0 rgba(111, 227, 160, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 10px rgba(111, 227, 160, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(111, 227, 160, 0);
    }
}

.hero-name {
    margin-top: 22px;
    font-size: clamp(3rem, 8vw, 6.2rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-name span {
    display: block;
    background: linear-gradient(100deg, #ffffff 10%, #a9c9ff 55%, #b6a6ff 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-role {
    margin-top: 22px;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    color: var(--accent);
}

.hero-motto {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 10px 18px 10px 14px;
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--accent-strong);
    border-radius: 14px;
    background: var(--glass);
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.hero-motto .globe-icon {
    font-size: 1.3em;
    line-height: 1;
}

.hero-motto .motto-text {
    background: linear-gradient(100deg, #ffffff 10%, #a9c9ff 55%, #b6a6ff 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text {
    max-width: 52ch;
    margin-top: 14px;
    font-size: 1.05rem;
    color: var(--text-soft);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-visual {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 560px;
    justify-self: center;
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95, 168, 255, 0.35), transparent 65%);
    filter: blur(30px);
}

#hero-earth {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
}

#hero-earth.is-dragging {
    cursor: grabbing;
}

.drag-hint {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--glass);
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hero-visual.was-dragged .drag-hint {
    opacity: 0;
}

.earth-fallback {
    position: absolute;
    inset: 14%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.25), transparent 45%),
        url("assets/img/earth-blue-marble.jpg") center / 200% 100%;
    box-shadow: inset -40px -30px 80px rgba(0, 0, 0, 0.85), 0 0 80px rgba(95, 168, 255, 0.35);
    transition: opacity 0.8s ease;
}

.hero-visual.is-live .earth-fallback {
    opacity: 0;
}

.orbit-chip {
    position: absolute;
    pointer-events: none;
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--glass-strong);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    animation: float 6s ease-in-out infinite;
}

.orbit-chip:nth-child(3) { top: 12%; left: 2%; }
.orbit-chip:nth-child(4) { top: 22%; right: 0; animation-delay: -1.5s; }
.orbit-chip:nth-child(5) { bottom: 22%; left: -2%; animation-delay: -3s; }
.orbit-chip:nth-child(6) { bottom: 10%; right: 6%; animation-delay: -4.5s; }

@keyframes float {
    50% {
        transform: translateY(-10px);
    }
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 56px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.stat {
    padding: 22px 24px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat span {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* ---------- sections ---------- */

.section {
    padding-block: 100px 20px;
    scroll-margin-top: 70px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    margin-top: 14px;
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.section-lead {
    max-width: 60ch;
    margin-top: 16px;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.section-head {
    margin-bottom: 48px;
}


/* ---------- projects ---------- */

.project {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    padding: 28px;
    margin-bottom: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(160deg, rgba(95, 168, 255, 0.07), transparent 40%),
        var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    overflow: hidden;
}

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

.project.reverse .media {
    order: 2;
}

.media {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: #02050a;
    aspect-ratio: 4 / 3;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02);
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.media > img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.media:hover > img:first-child {
    transform: scale(1.05);
}

.media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(2, 5, 10, 0.75));
    pointer-events: none;
}

.media-inset {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    width: 34%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.play {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffffff;
    color: #04101f;
    font-size: 1rem;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media:hover .play-icon {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.12);
}

.project-body {
    min-width: 0;
}

.project-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid rgba(111, 227, 160, 0.35);
    border-radius: 999px;
    color: var(--ok);
    font-size: 0.74rem;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.project h3 {
    margin-top: 14px;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.project-text {
    margin-top: 14px;
    color: var(--text-soft);
}

.evolution {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.85rem;
}

.evolution span {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
}

.evolution b {
    color: var(--accent);
    font-weight: 600;
}

.evolution .now {
    border-color: rgba(159, 195, 255, 0.45);
    color: var(--text);
    background: rgba(159, 195, 255, 0.08);
}

.features {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.features li {
    position: relative;
    padding-left: 28px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent) 0 3px, rgba(159, 195, 255, 0.18) 4px);
}

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

.tags span {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-soft);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.credit {
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* ---------- skills ---------- */

.skills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.glass-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(95, 168, 255, 0.3), rgba(124, 92, 255, 0.2));
    border: 1px solid var(--line-strong);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.9rem;
}

.glass-card h3 {
    margin-top: 18px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.skill-list {
    display: grid;
    gap: 12px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.skill-list li {
    display: grid;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.skill-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.skill-list strong {
    font-weight: 600;
}

.skill-list small {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.strengths {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.strength {
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(124, 92, 255, 0.08), transparent 60%), var(--glass);
}

.strength small {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.strength h3 {
    margin-top: 8px;
    font-size: 1.2rem;
    font-weight: 800;
}

.strength p {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-soft);
}


/* ---------- CV ---------- */

.cv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.cv-main {
    min-width: 0;
}

.cv-subtitle {
    margin: 0 0 18px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cv-main .timeline + .cv-subtitle {
    margin-top: 22px;
}

.cv-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 20px;
    min-width: 0;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--accent-strong), var(--glow), rgba(124, 92, 255, 0.1));
}

.timeline > li {
    position: relative;
    padding: 0 0 22px 52px;
}

.timeline > li::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 22px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
}

.timeline > li.now::before {
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(159, 195, 255, 0.18), 0 0 20px var(--accent);
}

.step {
    padding: 18px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: var(--glass);
}

.step time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.step strong {
    display: block;
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 1.08rem;
}

.step span {
    display: block;
    margin-top: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.step-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.step-tag {
    padding: 2px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-soft);
}

.tasks {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
}

.tasks li {
    position: relative;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.tasks li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.facts {
    display: grid;
    gap: 0;
    margin: 14px 0 0;
}

.facts div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-block: 11px;
    border-bottom: 1px solid var(--line);
}

.facts div:last-child {
    border-bottom: 0;
}

.facts dt {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.facts dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.lang-list {
    margin-top: 8px;
}

.lang-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
}

.lang-row:last-child {
    border-bottom: 0;
}

.lang-row b {
    font-weight: 600;
}

.lang-row em {
    font-style: normal;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--accent);
}

.meter {
    grid-column: 1 / -1;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-strong), var(--glow));
}


.cv-portrait {
    position: relative;
    max-width: 400px;
    margin: 28px 0 0 52px;
    padding: 3px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-strong), var(--glow));
    box-shadow: 0 30px 70px -30px rgba(95, 168, 255, 0.55);
}

.cv-portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 507 / 586;
    object-fit: cover;
    border-radius: calc(var(--radius) - 3px);
}

.cv-portrait figcaption {
    position: absolute;
    inset: auto 3px 3px 3px;
    display: grid;
    gap: 2px;
    padding: 48px 20px 18px;
    border-radius: 0 0 calc(var(--radius) - 3px) calc(var(--radius) - 3px);
    background: linear-gradient(transparent, rgba(2, 5, 10, 0.9));
}

.cv-portrait small {
    color: var(--text-soft);
}

@media (max-width: 1000px) {
    .cv-portrait {
        margin: 28px auto 0;
    }
}


/* ---------- contact ---------- */

.contact-card {
    position: relative;
    padding: clamp(28px, 5vw, 56px);
    border-radius: 32px;
    border: 1px solid var(--line-strong);
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(124, 92, 255, 0.25), transparent 60%),
        radial-gradient(60% 80% at 0% 100%, rgba(95, 168, 255, 0.2), transparent 60%),
        var(--glass-strong);
    overflow: hidden;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.contact-card h1,
.contact-card h2 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.contact-card p {
    margin-top: 16px;
    color: var(--text-soft);
    max-width: 46ch;
}

.contact-list {
    display: grid;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: rgba(3, 6, 12, 0.5);
}

.contact-item small {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-item strong {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-item > div {
    min-width: 0;
}

.copy {
    flex-shrink: 0;
    padding: 7px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.copy:hover {
    border-color: var(--accent);
}

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

footer {
    padding-block: 60px 40px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

footer .wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
}


/* ---------- entrance (hero only, from a visible state) ---------- */

.rise {
    animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: var(--d, 0s);
}

@keyframes rise {
    from {
        transform: translateY(18px);
        filter: blur(4px);
        opacity: 0.4;
    }
}


/* ---------- screenshot viewer ---------- */

.shots-dialog {
    width: min(1100px, 100%);
}

.shots-view {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 230px);
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.shots-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.shots-thumb {
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.shots-thumb[aria-pressed="true"] {
    border-color: var(--accent);
    color: var(--accent);
}


/* ---------- game modal ---------- */

.game-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.game-modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.game-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 5, 10, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.game-dialog {
    position: relative;
    width: min(940px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: #0a111c;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

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

.game-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.game-dialog-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.game-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    font-size: 1.3rem;
    cursor: pointer;
}

.game-stage-wrap {
    width: min(100%, max(300px, calc((100vh - 260px) * 4 / 3)));
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #03060d;
}

.game-dialog:has(.hangman-panel) .game-stage-wrap {
    width: min(100%, max(300px, calc((100vh - 380px) * 4 / 3)));
}

.game-stage-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    touch-action: none;
}

.game-stage-wrap.is-3d {
    position: relative;
}

.game-gl-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.game-stage-wrap.is-3d #game-canvas {
    position: relative;
    background: transparent;
}

.game-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px 20px;
    margin-top: 14px;
}

.game-help {
    max-width: 460px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.game-mobile-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.game-control-button {
    min-width: 46px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    touch-action: none;
}

.game-control-button:hover,
.game-control-button:active {
    border-color: var(--accent);
}

.hangman-panel {
    margin-top: 14px;
}

.hangman-keys {
    display: grid;
    grid-template-columns: repeat(13, 1fr);
    gap: 6px;
}

.hangman-key {
    min-height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--font-display);
    font-weight: 800;
    cursor: pointer;
}

.hangman-key:hover:not(:disabled) {
    border-color: var(--accent);
}

.hangman-key:disabled {
    opacity: 0.4;
    cursor: default;
}

.hangman-key.is-hit {
    opacity: 1;
    border-color: rgba(111, 227, 160, 0.6);
    background: rgba(111, 227, 160, 0.16);
    color: #c9f7d5;
}

.hangman-key.is-miss {
    opacity: 0.5;
    border-color: rgba(255, 110, 130, 0.45);
    color: #ffb3ba;
    text-decoration: line-through;
}

.hangman-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.hangman-action {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.hangman-action:disabled {
    opacity: 0.4;
    cursor: default;
}

.hangman-next.is-ready {
    border-color: transparent;
    background: #ffffff;
    color: #04101f;
}


/* ---------- responsive ---------- */

@media (max-width: 1000px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 6px 24px 14px;
        font-size: 1rem;
        background: #03060c;
        border-bottom: 1px solid var(--line);
    }

    .nav.open .nav-links {
        display: flex;
    }

    .nav-links a {
        padding-block: 14px;
        border-bottom: 1px solid var(--line);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-toggle {
        display: grid;
    }

    .hero-grid,
    .project,
    .project.reverse,
    .cv-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project.reverse .media {
        order: 0;
    }

    .hero-visual {
        max-width: 440px;
    }

    .skills {
        grid-template-columns: 1fr;
    }

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

    .cv-side {
        position: static;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 40px;
    }

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

    .stat:nth-child(2) {
        border-right: 0;
    }

    .stat:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .project {
        padding: 16px;
        gap: 24px;
    }

    .strengths {
        grid-template-columns: 1fr;
    }

    .orbit-chip {
        font-size: 0.72rem;
        padding: 6px 10px;
    }

    .nav-right .btn {
        display: none;
    }

    .nav-links-cv {
        display: block;
    }

    .hangman-keys {
        grid-template-columns: repeat(7, 1fr);
    }

    .hangman-key {
        min-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}




.nav-links a[aria-current] {
    color: var(--text);
}

.nav-links a[aria-current]::after {
    transform: scaleX(1);
}


/* ---------- contact form ---------- */

.contact-card .contact-form {
    margin-top: 28px;
    max-width: 720px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    font: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:hover,
.form-group textarea:hover {
    background: rgba(255, 255, 255, 0.07);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(95, 168, 255, 0.25);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.contact-form .btn {
    cursor: pointer;
    font: inherit;
}

.form-message {
    min-height: 22px;
    margin: 14px 0 0;
    color: var(--ok);
    font-size: 0.9rem;
}

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


/* ---------- learning cards (parcours page) ---------- */

.learning {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.learning .glass-card p {
    margin: 10px 0 0;
    color: var(--text-soft);
}

@media (max-width: 1000px) {
    .learning {
        grid-template-columns: 1fr;
    }
}


/* ---------- project goal line ---------- */

.project-goal {
    margin: 14px 0 0;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.project-goal strong {
    margin-right: 6px;
    color: var(--accent);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
