:root {
    --navy-950: #0b1728;
    --navy-900: #132845;
    --navy-800: #1e355e;
    --blue-600: #0769b0;
    --blue-500: #1683d8;
    --lime-500: #a3c642;
    --white: #ffffff;
    --gray-50: #f7f9fc;
    --gray-100: #eef2f7;
    --gray-300: #c8d2df;
    --gray-600: #566477;
    --gray-800: #263548;
    --shadow: 0 24px 60px rgba(10, 29, 54, .14);
    --radius-lg: 28px;
    --radius-md: 18px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--gray-800);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 999; background: var(--lime-500); color: var(--navy-950); padding: 10px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(11, 23, 40, .88);
    backdrop-filter: blur(16px);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font-weight: 760; letter-spacing: -.01em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--navy-950); background: var(--lime-500); font-size: .9rem; font-weight: 850; }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a, .back-link { color: rgba(255,255,255,.78); text-decoration: none; font-weight: 650; font-size: .95rem; }
.main-nav a:hover, .main-nav a:focus-visible, .back-link:hover { color: var(--white); }
.nav-toggle { display: none; border: 0; background: transparent; padding: 10px; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--white); }

.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 75% 20%, rgba(22,131,216,.30), transparent 34%),
        radial-gradient(circle at 20% 90%, rgba(163,198,66,.12), transparent 26%),
        linear-gradient(145deg, var(--navy-950), var(--navy-800));
}
.hero::after { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 85%); }
.hero-grid { position: relative; z-index: 1; min-height: 720px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 70px; align-items: center; padding-block: 90px; }
.eyebrow, .section-kicker { margin: 0 0 14px; color: var(--blue-600); font-size: .82rem; font-weight: 820; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: var(--lime-500); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 6.4rem); max-width: 920px; }
h1 span { color: var(--lime-500); }
.hero-lead { max-width: 720px; margin: 28px 0 0; color: rgba(255,255,255,.76); font-size: clamp(1.12rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.linkedin-hint { margin: 11px 0 0; color: rgba(255,255,255,.55); font-size: .82rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 21px; border: 1px solid transparent; border-radius: 14px; text-decoration: none; font-weight: 760; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--navy-950); background: var(--lime-500); }
.button-primary:hover { background: #b2d552; }
.button-secondary { color: var(--white); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.button-secondary:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.10); }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 50px 0 0; padding: 28px 0 0; border-top: 1px solid rgba(255,255,255,.14); list-style: none; }
.hero-facts li { display: grid; gap: 3px; }
.hero-facts strong { color: var(--white); font-size: 1.15rem; }
.hero-facts span { color: rgba(255,255,255,.62); font-size: .9rem; }

.hero-visual { position: relative; min-height: 430px; display: grid; place-items: center; }
.portrait-card { position: relative; z-index: 3; width: min(100%, 330px); aspect-ratio: 4/5; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.18); border-radius: 36px; background: linear-gradient(165deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.portrait-monogram { display: grid; place-items: center; height: 100%; color: var(--white); font-size: clamp(5rem, 12vw, 8.5rem); font-weight: 900; letter-spacing: -.09em; }
.status-line { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.7); font-size: .9rem; }
.status-line span { width: 9px; height: 9px; border-radius: 50%; background: var(--lime-500); box-shadow: 0 0 0 6px rgba(163,198,66,.12); }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.orbit-one { width: 420px; height: 420px; }
.orbit-two { width: 520px; height: 520px; border-style: dashed; animation: spin 32s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { padding: 110px 0; }
.section-alt { background: var(--gray-50); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: start; }
.section h2, .section-title, .contact-box h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 4.2rem); color: var(--navy-900); }
.prose p { margin-top: 0; font-size: 1.08rem; color: var(--gray-600); }
.prose p + p { margin-top: 22px; }
.section-title { max-width: 760px; margin-bottom: 44px; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card { min-height: 280px; padding: 30px; border: 1px solid var(--gray-100); border-radius: var(--radius-md); background: var(--white); box-shadow: 0 10px 35px rgba(30,53,94,.06); transition: transform .25s ease, box-shadow .25s ease; }
.info-card:hover { transform: translateY(-5px); box-shadow: 0 18px 45px rgba(30,53,94,.11); }
.card-number { display: inline-flex; margin-bottom: 46px; color: var(--blue-600); font-size: .78rem; font-weight: 850; letter-spacing: .12em; }
.info-card h3 { margin: 0 0 14px; color: var(--navy-900); font-size: 1.35rem; }
.info-card p { margin: 0; color: var(--gray-600); }

.project-list { border-top: 1px solid var(--gray-300); }
.project-item { display: grid; grid-template-columns: 190px 1fr; gap: 30px; padding: 34px 0; border-bottom: 1px solid var(--gray-300); }
.project-meta { color: var(--blue-600); font-size: .78rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.project-item h3 { margin: 0 0 8px; color: var(--navy-900); font-size: 1.45rem; }
.project-item p { margin: 0; max-width: 780px; color: var(--gray-600); }

.contact-section { padding: 0 0 90px; }
.contact-box { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 58px; color: var(--white); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--navy-900), var(--blue-600)); box-shadow: var(--shadow); }
.contact-box h2 { color: var(--white); }
.contact-box p { margin: 14px 0 0; color: rgba(255,255,255,.75); }
.section-kicker-light { color: var(--lime-500); }
.button-light { color: var(--navy-900); background: var(--white); white-space: nowrap; }

.site-footer { color: rgba(255,255,255,.68); background: var(--navy-950); }
.footer-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--white); }

.legal-header { position: static; }
.legal-page { min-height: 70vh; padding: 80px 0 100px; background: var(--gray-50); }
.legal-content { max-width: 850px; }
.legal-content h1 { color: var(--navy-900); font-size: clamp(2.7rem, 6vw, 4.8rem); }
.legal-content h2 { margin-top: 42px; color: var(--navy-900); font-size: 1.5rem; }
.legal-content p { color: var(--gray-600); }
.legal-content a { color: var(--blue-600); }
.legal-note { margin: 28px 0 36px; padding: 18px 20px; border-left: 5px solid var(--lime-500); border-radius: 10px; background: var(--white); color: var(--gray-800); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; min-height: auto; padding-block: 80px; }
    .hero-visual { display: none; }
    .two-column { grid-template-columns: 1fr; gap: 34px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-box { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
    .container { width: min(calc(100% - 28px), var(--container)); }
    .brand-text { font-size: .94rem; }
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 76px; left: 14px; right: 14px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: var(--navy-950); box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav a { padding: 13px 12px; }
    .hero-grid { padding-block: 68px; }
    h1 { font-size: clamp(2.9rem, 14vw, 4.5rem); }
    .hero-facts { grid-template-columns: 1fr; gap: 16px; }
    .section { padding: 82px 0; }
    .card-grid { grid-template-columns: 1fr; }
    .info-card { min-height: auto; }
    .project-item { grid-template-columns: 1fr; gap: 10px; }
    .contact-box { padding: 36px 24px; border-radius: 22px; }
    .button-light { width: 100%; white-space: normal; text-align: center; }
    .footer-inner { min-height: 120px; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Personal portrait and career timeline */
.portrait-card {
    overflow: hidden;
    padding: 0;
    background: var(--navy-900);
}
.portrait-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 35%;
}
.portrait-card .status-line {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 13px;
    color: var(--white);
    background: rgba(11,23,40,.72);
    backdrop-filter: blur(12px);
}

.career-section {
    overflow: hidden;
}
.career-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 90px;
    align-items: start;
}
.career-intro {
    position: sticky;
    top: 118px;
}
.career-intro h2 {
    margin-bottom: 24px;
}
.career-intro > p:not(.section-kicker) {
    max-width: 520px;
    margin: 0;
    color: var(--gray-600);
    font-size: 1.05rem;
}
.qualification-card {
    display: grid;
    gap: 8px;
    margin-top: 36px;
    padding: 24px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}
.qualification-label {
    color: var(--blue-600);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.qualification-card strong {
    color: var(--navy-900);
    font-size: 1.08rem;
}
.qualification-card span:last-child {
    color: var(--gray-600);
    font-size: .92rem;
}
.timeline {
    position: relative;
    padding-left: 46px;
}
.timeline::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 10px;
    width: 2px;
    background: linear-gradient(var(--blue-600), var(--lime-500));
}
.timeline-item {
    position: relative;
    padding: 0 0 42px 0;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.timeline-marker {
    position: absolute;
    top: 7px;
    left: -46px;
    width: 22px;
    height: 22px;
    border: 5px solid var(--white);
    border-radius: 50%;
    background: var(--blue-600);
    box-shadow: 0 0 0 1px var(--gray-300);
}
.timeline-education .timeline-marker {
    background: var(--lime-500);
}
.timeline-period {
    margin: 0 0 7px;
    color: var(--blue-600);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.timeline-item h3 {
    margin: 0 0 6px;
    color: var(--navy-900);
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}
.timeline-company {
    margin: 0;
    color: var(--gray-600);
}

@media (max-width: 980px) {
    .career-layout {
        grid-template-columns: 1fr;
        gap: 52px;
    }
    .career-intro {
        position: static;
    }
    .qualification-card {
        max-width: 560px;
    }
}

@media (max-width: 760px) {
    .timeline {
        padding-left: 36px;
    }
    .timeline-marker {
        left: -36px;
        width: 20px;
        height: 20px;
    }
    .timeline::before {
        left: 9px;
    }
}
.portrait-card { margin: 0; }

/* Version 3: profile, leadership, projects and personal section */
.profile-quote {
    margin: 30px 0 0;
    padding: 24px 28px;
    border-left: 5px solid var(--lime-500);
    border-radius: 0 16px 16px 0;
    color: var(--navy-900);
    background: var(--gray-50);
    font-size: 1.18rem;
    font-weight: 680;
}

.responsibility-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.responsibility-card {
    min-height: 270px;
    padding: 28px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 10px 35px rgba(30,53,94,.06);
}
.responsibility-value {
    display: inline-block;
    margin-bottom: 48px;
    color: var(--blue-600);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .12em;
}
.responsibility-card h3 {
    margin: 0 0 12px;
    color: var(--navy-900);
    font-size: 1.35rem;
}
.responsibility-card p {
    margin: 0;
    color: var(--gray-600);
}

.technology-panel {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: center;
    margin-top: 24px;
    padding: 36px;
    border-radius: var(--radius-md);
    color: var(--white);
    background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
}
.technology-label {
    margin: 0 0 8px;
    color: var(--lime-500);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.technology-panel h3 {
    margin: 0;
    font-size: 1.6rem;
}
.technology-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.technology-tags li {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-weight: 720;
}

.project-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.project-card {
    position: relative;
    min-height: 390px;
    padding: 34px;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 12px 40px rgba(30,53,94,.08);
}
.project-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(163,198,66,.13);
}
.project-index {
    margin: 0 0 50px;
    color: var(--blue-600);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.project-card h3 {
    margin: 0 0 16px;
    color: var(--navy-900);
    font-size: 1.55rem;
}
.project-card > p:not(.project-index) {
    margin: 0;
    color: var(--gray-600);
}
.project-tag {
    position: absolute;
    left: 34px;
    bottom: 30px;
    z-index: 1;
    color: var(--navy-900);
    font-size: .78rem;
    font-weight: 800;
}

.timeline-note {
    max-width: 670px;
    margin: 12px 0 0;
    padding: 12px 15px;
    border-left: 3px solid var(--lime-500);
    border-radius: 0 10px 10px 0;
    color: var(--gray-600);
    background: rgba(163,198,66,.08);
    font-size: .93rem;
}

.personal-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 70px;
    align-items: center;
}
.personal-intro h2 {
    max-width: 560px;
}
.personal-card {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 30px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: 0 14px 45px rgba(30,53,94,.09);
}
.personal-photo {
    position: relative;
    margin: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--gray-100);
    border-radius: 22px;
    background: var(--gray-100);
}
.personal-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.personal-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 52% 43%;
}
.personal-content > p {
    margin: 0;
    color: var(--gray-600);
    font-size: 1.05rem;
}
.personal-content > p + p {
    margin-top: 16px;
}
.interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}
.interest-list span {
    padding: 9px 13px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    color: var(--navy-900);
    background: var(--gray-50);
    font-size: .9rem;
    font-weight: 720;
}

.nerd-section {
    overflow: hidden;
}
.nerd-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
}
.nerd-heading h2 {
    margin-bottom: 16px;
}
.nerd-heading p:not(.section-kicker) {
    max-width: 720px;
    margin: 0;
    color: var(--gray-600);
    font-size: 1.05rem;
}
.nerd-toggle {
    flex: 0 0 auto;
    color: var(--navy-900);
    border-color: var(--gray-300);
    background: var(--white);
}
.game-shell {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid rgba(7,105,176,.18);
    border-radius: var(--radius-lg);
    background: var(--navy-950);
    box-shadow: var(--shadow);
}
.game-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.game-stat {
    min-width: 112px;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 13px;
    background: rgba(255,255,255,.06);
}
.game-stat span {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: .72rem;
    font-weight: 760;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.game-stat strong {
    display: block;
    color: var(--white);
    font-size: 1.3rem;
}
.game-start {
    margin-left: auto;
}
.game-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: #0b1728;
}
#packet-canvas {
    width: 100%;
    height: auto;
    display: block;
    touch-action: none;
}
.game-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    color: var(--white);
    background: rgba(11,23,40,.68);
    backdrop-filter: blur(4px);
}
.game-overlay strong {
    font-size: clamp(1.8rem, 5vw, 3.2rem);
}
.game-overlay span {
    color: rgba(255,255,255,.72);
}
.game-overlay[hidden] {
    display: none;
}
.game-controls {
    display: none;
    margin-top: 18px;
    text-align: center;
}
.game-controls > button,
.game-controls div button {
    width: 54px;
    height: 46px;
    margin: 3px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    color: var(--white);
    background: rgba(255,255,255,.08);
    font: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    touch-action: none;
}
.game-controls button:active,
.game-controls button.is-pressed {
    background: var(--blue-600);
}
.game-help,
.game-status {
    margin: 14px 0 0;
    color: rgba(255,255,255,.65);
    font-size: .92rem;
}
.game-status {
    color: var(--lime-500);
    font-weight: 760;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}
.contact-links a {
    color: var(--white);
    font-weight: 760;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

@media (max-width: 1080px) {
    .responsibility-grid { grid-template-columns: repeat(2, 1fr); }
    .project-showcase { grid-template-columns: 1fr; }
    .project-card { min-height: 310px; }
}

@media (max-width: 980px) {
    .technology-panel { grid-template-columns: 1fr; }
    .technology-tags { justify-content: flex-start; }
    .personal-layout { grid-template-columns: 1fr; gap: 34px; }
    .personal-card { grid-template-columns: 200px minmax(0, 1fr); }
    .nerd-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
    .responsibility-grid { grid-template-columns: 1fr; }
    .responsibility-card { min-height: auto; }
    .responsibility-value { margin-bottom: 28px; }
    .technology-panel { padding: 28px 22px; }
    .project-card { min-height: 355px; padding: 28px 24px; }
    .project-tag { left: 24px; }
    .profile-quote { padding: 20px; font-size: 1.04rem; }
    .personal-card { grid-template-columns: 1fr; padding: 20px; }
    .personal-photo { width: min(100%, 250px); }
    .game-shell { padding: 14px; border-radius: 20px; }
    .game-toolbar { display: grid; grid-template-columns: repeat(3, 1fr); }
    .game-stat { min-width: 0; padding: 9px 10px; }
    .game-start { grid-column: 1 / -1; width: 100%; margin-left: 0; }
    .game-controls { display: block; }
}


/* Version 6: WEMA context, vCard, legal status and custom 404 */
.timeline-description {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--gray-600);
    font-size: .96rem;
}
.legal-status {
    margin-top: 48px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-300);
    font-size: .9rem;
}
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--white);
    background:
        radial-gradient(circle at 72% 22%, rgba(22,131,216,.28), transparent 32%),
        linear-gradient(145deg, var(--navy-950), var(--navy-800));
}
.error-main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 80px 0;
}
.error-card {
    position: relative;
    max-width: 850px;
    padding: 60px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.06);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}
.error-card .section-kicker { color: var(--lime-500); }
.error-card h1 {
    max-width: 720px;
    font-size: clamp(2.6rem, 7vw, 5.3rem);
}
.error-card > p:not(.section-kicker) {
    max-width: 650px;
    margin: 22px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 1.1rem;
}
.error-code {
    position: absolute;
    right: 24px;
    top: -54px;
    color: rgba(255,255,255,.045);
    font-size: 13rem;
    font-weight: 900;
    line-height: 1;
}
.error-route {
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 38px 0;
}
.route-node {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    font-weight: 750;
}
.route-line {
    flex: 1;
    height: 2px;
    background: var(--lime-500);
}
.route-line-muted { background: rgba(255,255,255,.18); }
.route-fail {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--white);
    background: #e15a64;
    font-size: 1.45rem;
    font-weight: 900;
}
.error-page .site-footer {
    border-top-color: rgba(255,255,255,.10);
    background: transparent;
}
.error-page .site-footer p,
.error-page .site-footer a { color: rgba(255,255,255,.68); }

@media (max-width: 760px) {
    .error-card { padding: 38px 24px; }
    .error-code { font-size: 8rem; top: -20px; right: 8px; }
    .error-route { margin: 30px 0; }
    .route-node { padding: 7px 9px; font-size: .82rem; }
}
