
:root {
    --bg: #020617;
    --bg-deep: #01030c;
    --panel: #071226;
    --panel-2: #091a33;
    --text: #f7f8ff;
    --muted: #aebbd8;
    --line: rgba(109, 142, 219, .28);
    --blue: #208cff;
    --cyan: #42c9ff;
    --pink: #ff21b6;
    --purple: #9d37ff;
    --header-h: 64px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 38%, rgba(23, 82, 255, .12), transparent 28rem),
        radial-gradient(circle at 88% 40%, rgba(255, 25, 181, .11), transparent 28rem),
        var(--bg);
}

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

svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* ---------- HEADER ---------- */

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
    align-items: center;
    gap: 24px;
    padding: 0 clamp(22px, 4vw, 72px);
    background: rgba(2, 6, 23, .77);
    border-bottom: 1px solid rgba(80, 120, 220, .27);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.site-brand {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-style: italic;
    font-weight: 700;
    text-shadow: 0 0 14px rgba(86, 153, 255, .72);
}

.brand-star {
    color: #6ec9ff;
    font-size: 24px;
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 17px;
    color: #d9e3ff;
    font-size: 14px;
}

.main-nav a svg {
    width: 15px;
    height: 15px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    text-shadow: 0 0 12px rgba(98, 165, 255, .8);
}

.main-nav a.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 2px;
    background: #54a7ff;
    box-shadow: 0 0 12px #368cff;
}

.header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: #ecf1ff;
    transition: transform .2s ease, color .2s ease, filter .2s ease;
}

.header-icon svg { width: 19px; height: 19px; }

.header-icon:hover { transform: translateY(-1px); }
.header-icon.youtube:hover { color: #ff4e85; }
.header-icon.github:hover { color: #fff; }

.language {
    padding: 8px 11px;
    border: 1px solid rgba(120, 146, 210, .34);
    border-radius: 5px;
    color: #dce5fb;
    background: rgba(6, 12, 31, .6);
    font-size: 12px;
}

/* ---------- HERO ---------- */

.hero {
    /* Header image controls:
       --hero-zoom: 1 = normal, 1.05 = +5%, 1.10 = +10%
       --hero-shift-x: negative = move left, positive = move right
       --hero-shift-y: negative = move up, positive = move down */
    --hero-zoom: 1.06;
    --hero-shift-x: 0px;
    --hero-shift-y: -128px;

    position: relative;
    width: 100%;
    margin-top: var(--header-h);
    aspect-ratio: 1672 / 941;
    min-height: 560px;
    max-height: calc(100vh - var(--header-h) + 160px);
    overflow: hidden;
    background: #020617;
}

.hero-picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;

    /* Real image movement, independent from object-position */
    transform:
        translate(var(--hero-shift-x), var(--hero-shift-y))
        scale(var(--hero-zoom));
    transform-origin: center center;
    will-change: transform;
}

.hero-vignette {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 12, .03) 0%, rgba(0, 0, 12, .02) 55%, rgba(2, 6, 23, .15) 73%, rgba(2, 6, 23, .94) 100%),
        linear-gradient(to right, rgba(0, 4, 17, .15), transparent 17%, transparent 83%, rgba(0, 4, 17, .15));
}

.hero-emblem {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 0.4%;
    width: clamp(255px, 28vw, 470px);
    transform: translateX(-50%);
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .7));
}

.hero-emblem img {
    display: block;
    width: 100%;
    height: auto;
}

.twitch-card {
    position: absolute;
    z-index: 6;
    bottom: 9.6%;
    width: clamp(290px, 27vw, 425px);
    min-height: 124px;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    background: rgba(3, 11, 30, .89);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .52);
}

/* Avatar zoom controls:
   Change --avatar-zoom in .twitch-seije / .twitch-selene below.
   1 = normal, 1.10 = +10%, 1.20 = +20%, etc.
   --avatar-x / --avatar-y move the crop focus if needed. */
.avatar-frame {
    width: 92px;
    height: 92px;
    overflow: hidden;
    border-radius: 7px;
    background: #050b18;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: var(--avatar-x, 50%) var(--avatar-y, 50%);
    transform: scale(var(--avatar-zoom, 1));
    transform-origin: center;
}

.twitch-seije {
    /* Avatar Seije: edit these 3 values if you want another crop/zoom */
    --avatar-zoom: 2;
    --avatar-x: 50%;
    --avatar-y: 68%;
    left: 2.4%;
    border: 1px solid #1b8cff;
    box-shadow: 0 0 23px rgba(0, 117, 255, .24), 0 18px 42px rgba(0, 0, 0, .5);
}

.twitch-selene {
    /* Avatar Sélène: edit these 3 values if you want another crop/zoom */
    --avatar-zoom: 2;
    --avatar-x: 50%;
    --avatar-y: 68%;
    right: 2.4%;
    border: 1px solid #ff20bf;
    box-shadow: 0 0 23px rgba(255, 0, 183, .23), 0 18px 42px rgba(0, 0, 0, .5);
}

.twitch-info h2 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: 25px;
    line-height: 1;
}

.twitch-seije h2 { color: #e7f3ff; }
.twitch-selene h2 { color: #ffd9f4; }

.twitch-info p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    color: #cad6ee;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
}

.twitch-info p svg {
    width: 14px;
    height: 14px;
}

.twitch-info a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 35px;
    padding: 8px 13px;
    border-radius: 5px;
    color: white;
    font-weight: 700;
    font-size: 13px;
}

.twitch-info a svg {
    width: 16px;
    height: 16px;
}

.twitch-seije .twitch-info a {
    background: linear-gradient(135deg, #187cff, #159dff);
    box-shadow: 0 0 17px rgba(22, 136, 255, .48);
}

.twitch-selene .twitch-info a {
    background: linear-gradient(135deg, #b914df, #f414c7);
    box-shadow: 0 0 17px rgba(241, 22, 198, .43);
}

/* ---------- HERO CAPTION ---------- */

.hero-caption {
    position: relative;
    z-index: 9;
    margin-top: -2px;
    padding: 14px 20px 46px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% -20%, rgba(44, 62, 126, .22), transparent 55%),
        var(--bg);
}

.hero-caption h1 {
    margin: 0 0 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 2.4vw, 39px);
    font-style: italic;
    font-weight: 600;
    letter-spacing: .055em;
}

.hero-caption p {
    margin: 0;
    color: #bad0f3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .38em;
}

.hero-caption p span {
    padding: 0 10px;
    color: #fff;
    text-shadow: 0 0 10px #65a5ff;
}

/* ---------- PROJECTS ---------- */

.projects-section {
    position: relative;
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px clamp(26px, 4vw, 65px) 72px;
}

.section-title {
    display: grid;
    grid-template-columns: minmax(40px, 1fr) auto auto auto minmax(40px, 1fr);
    gap: 14px;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 32px;
    text-align: center;
}

.section-title .rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(55, 136, 255, .75));
}

.section-title .rule:last-child {
    background: linear-gradient(90deg, rgba(255, 39, 184, .7), transparent);
}

.section-title .spark {
    color: #96b9ff;
    text-shadow: 0 0 12px #4487ff;
}

.section-title h2 {
    margin: 0 0 7px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
}

.section-title p {
    margin: 0;
    color: #aebbd8;
    font-size: 13px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.project-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid #263e6b;
    border-radius: 9px;
    background: linear-gradient(180deg, #07152c, #050d20);
    box-shadow: 0 18px 35px rgba(0, 0, 0, .38);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: #4870ad;
    box-shadow: 0 22px 44px rgba(0, 0, 0, .48);
}

.project-visual {
    position: relative;
    height: 170px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(18, 93, 255, .34), rgba(226, 29, 180, .19)),
        radial-gradient(circle at 50% 35%, #1b3977, #071126 62%);
    border-bottom: 1px solid rgba(84, 118, 180, .3);
}

.project-visual img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #dce8ff;
    text-align: center;
}

.project-visual.is-placeholder .project-placeholder {
    display: grid;
}

.project-placeholder span {
    color: #7fc5ff;
    font-size: 36px;
    text-shadow: 0 0 19px #3488ff;
}

.project-placeholder strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
}

.project-content {
    padding: 14px 15px 16px;
}

.project-content h3 {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.project-content > p {
    min-height: 85px;
    margin: 0 0 13px;
    color: #c0cae0;
    font-size: 13px;
    line-height: 1.45;
}

.project-buttons {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 8px;
}

.project-button {
    display: flex;
    min-width: 0;
    min-height: 35px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
}

.project-button svg {
    width: 14px;
    height: 14px;
}

.project-button.view {
    background: linear-gradient(135deg, #137cff, #1da6ff);
    box-shadow: 0 0 14px rgba(30, 135, 255, .3);
}

.project-button.github {
    border: 1px solid #526c9b;
    background: #081229;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
}

.project-tags span {
    padding: 5px 12px;
    border: 1px solid rgba(74, 106, 164, .39);
    border-radius: 999px;
    color: #c9d7f3;
    background: #0c2042;
    font-size: 10px;
}

/* ---------- SOCIAL STRIP ---------- */

.social-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    border-top: 1px solid #3d245f;
    border-bottom: 1px solid #3d245f;
    background:
        linear-gradient(90deg, rgba(11, 30, 76, .22), rgba(91, 16, 91, .12), rgba(16, 13, 47, .25)),
        #050817;
}

.social-strip > a {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 86px;
    padding: 15px 13px;
    border-right: 1px solid #26304d;
}

.social-strip > a:last-child {
    border-right: 0;
}

.social-strip > a:hover {
    background: rgba(255, 255, 255, .024);
}

.social-strip > a > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.social-strip strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
}

.social-strip small {
    color: #92a7cf;
    font-size: 11px;
}

.social-badge {
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.social-badge svg { width: 23px; height: 23px; }

.social-badge.discord { color: #9fa9ff; filter: drop-shadow(0 0 8px #6774ff); }
.social-badge.youtube { color: #ff4b8d; filter: drop-shadow(0 0 8px #ff176d); }
.social-badge.twitch { color: #b482ff; filter: drop-shadow(0 0 8px #8d4bff); }
.social-badge.twitch.pink { color: #f04ed7; filter: drop-shadow(0 0 8px #db18c0); }
.social-badge.github { color: white; }
.social-badge.website { color: #64c9ff; filter: drop-shadow(0 0 8px #259dff); }

/* ---------- FOOTER ---------- */

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px clamp(24px, 4vw, 72px);
    color: #8392b2;
    background: #02040d;
    font-size: 11px;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1180px) {
    .site-header {
        grid-template-columns: auto 1fr auto;
    }

    .main-nav {
        justify-self: center;
    }

    .language { display: none; }

    .hero {
        min-height: 590px;
    }

    .twitch-card {
        width: 300px;
        grid-template-columns: 72px 1fr;
        min-height: 104px;
    }

    .avatar-frame {
        width: 72px;
        height: 72px;
    }

    .twitch-info h2 { font-size: 21px; }
    .twitch-info p { margin-bottom: 8px; font-size: 12px; }
    .twitch-info a { min-height: 31px; font-size: 11px; }

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

    .project-content > p { min-height: 64px; }

    .social-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .social-strip > a {
        border-right: 1px solid #26304d;
        border-bottom: 1px solid #26304d;
    }

    .social-strip > a:nth-child(3n) {
        border-right: 0;
    }

    .social-strip > a:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .social-strip > a:last-child {
        border-right: 0;
    }
}

@media (max-width: 820px) {
    .hero {
        --hero-zoom: 1.12;
        --hero-shift-x: 0px;
        --hero-shift-y: -128px;
    }

    :root { --header-h: 58px; }

    .site-header {
        padding: 0 18px;
        gap: 12px;
    }

    .site-brand {
        font-size: 20px;
    }

    .brand-star { font-size: 18px; }

    .main-nav a {
        padding: 0 9px;
    }

    .main-nav a span {
        display: none;
    }

    .main-nav a svg {
        width: 18px;
        height: 18px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-icon {
        width: 24px;
        height: 24px;
    }

    .header-icon.github {
        display: none;
    }

    .hero {
        aspect-ratio: auto;
        height: 720px;
        min-height: 720px;
        max-height: none;
    }

    .hero-picture {
        object-fit: cover;
    }

    .hero-emblem {
        bottom: 145px;
        width: 245px;
    }

    .twitch-card {
        width: calc(50% - 22px);
        bottom: 38px;
        min-height: 105px;
        grid-template-columns: 66px 1fr;
        padding: 10px;
        gap: 10px;
    }

    .avatar-frame {
        width: 66px;
        height: 66px;
    }

    .twitch-seije { left: 14px; }
    .twitch-selene { right: 14px; }

    .twitch-info h2 {
        font-size: 18px;
    }

    .twitch-info p {
        font-size: 10px;
    }

    .twitch-info a {
        font-size: 10px;
        padding-inline: 7px;
    }

    .hero-caption {
        padding-top: 20px;
    }
}

@media (max-width: 620px) {
    /* Mobile-specific header image position */
    .hero {
        --hero-zoom: 1.18;
        --hero-shift-x: 0px;
        --hero-shift-y: -128px;
    }

    .site-brand span:last-child {
        display: none;
    }

    .hero {
        height: 700px;
        min-height: 700px;
    }


    .hero-vignette {
        background:
            linear-gradient(to bottom, transparent 35%, rgba(2, 6, 23, .16) 58%, rgba(2, 6, 23, .95) 100%);
    }

    .hero-emblem {
        bottom: 230px;
        width: 220px;
    }

    .twitch-card {
        width: calc(100% - 28px);
        left: 14px;
        right: 14px;
        grid-template-columns: 70px 1fr;
    }

    .twitch-seije {
        bottom: 118px;
    }

    .twitch-selene {
        bottom: 12px;
    }

    .avatar-frame {
        width: 70px;
        height: 70px;
    }

    .hero-caption h1 {
        font-size: 25px;
    }

    .hero-caption p {
        line-height: 1.8;
        letter-spacing: .2em;
    }

    .projects-section {
        padding-inline: 16px;
    }

    /* Mobile project heading: single centered block, no compressed grid */
    .section-title {
        display: flex;
        width: 100%;
        max-width: none;
        justify-content: center;
        align-items: center;
        gap: 0;
        margin-bottom: 26px;
        padding: 0 10px;
    }

    .section-title .rule,
    .section-title .spark {
        display: none;
    }

    .section-title > div {
        width: 100%;
        max-width: 420px;
    }

    .section-title h2 {
        font-size: clamp(27px, 8vw, 34px);
        line-height: 1.1;
        white-space: normal;
    }

    .section-title p {
        margin-top: 8px;
        font-size: 12px;
        line-height: 1.45;
    }

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

    .project-content > p {
        min-height: 0;
    }

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

    .social-strip > a {
        min-height: 78px;
        justify-content: flex-start;
        padding-left: 22px;
        border-bottom: 1px solid #26304d;
    }

    .social-strip > a:nth-child(odd) {
        border-right: 1px solid #26304d;
    }

    .social-strip > a:nth-child(even) {
        border-right: 0;
    }

    .social-strip > a:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
        justify-content: center;
    }

    .site-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   POSTER PAGE
   ======================================== */

.poster-page {
    width: 100%;
    margin: 0;
    padding: var(--header-h) 0 48px;
}

.poster-toolbar {
    width: 100%;
    padding: 28px 0 22px;
    background:
        linear-gradient(180deg, rgba(17, 36, 79, .22), rgba(2, 6, 23, 0));
}

.poster-toolbar-inner {
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.poster-info {
    min-width: 0;
}

.poster-kicker {
    display: block;
    margin-bottom: 6px;
    color: #7dbdff;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.poster-info h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    line-height: 1.08;
    text-shadow: 0 0 16px rgba(69, 142, 255, .32);
}

.poster-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.poster-action-button {
    width: auto;
    min-width: 150px;
    min-height: 42px;
    padding: 10px 17px;
    font-size: 12px;
}

/* Poster = 90% of the available page width */
.poster-viewer {
    position: relative;
    width: 90%;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(77, 118, 200, .34);
    border-radius: 10px;
    background: #01030c;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .42),
        0 0 30px rgba(29, 115, 255, .08);
}

.poster-image {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
}

.poster-error {
    width: 90%;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(7, 18, 38, .72);
}

@media (max-width: 720px) {
    .poster-page {
        padding-bottom: 30px;
    }

    .poster-toolbar {
        padding: 20px 0 18px;
    }

    .poster-toolbar-inner,
    .poster-viewer,
    .poster-error {
        width: calc(100% - 28px);
    }

    .poster-toolbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .poster-actions {
        width: 100%;
    }

    .poster-action-button {
        flex: 1;
        min-width: 0;
    }
}
