:root {
    color-scheme: dark;
    --text: #f5f2fc;
    --muted: #c1bdd2;
    --accent: #d7c5ff;
    --surface: #191b2a;
    --line: #383952;
    font-family: system-ui, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    min-width: 280px;
    background:
        radial-gradient(ellipse at 78% 14%, #38305c 0%, transparent 47%),
        radial-gradient(ellipse at -15% 50%, #172f41 0%, transparent 52%),
        #11131d;
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, .project-rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button { font: inherit; cursor: pointer; }
.skip { position: absolute; top: 0; left: 1rem; transform: translateY(-110%); padding: .75rem; background: var(--surface); }
.skip:focus { transform: none; z-index: 2; }
.container { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #ffffff20; background: #11131dd9; }
.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .8rem 1.45rem;
    padding-block: .85rem;
}
.header-identity { display: flex; align-items: center; gap: .9rem; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .4rem 1.15rem; margin-inline-start: auto; font-weight: 650; }
.nav-links a { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; color: var(--muted); }
.nav-links a:hover, .site-footer a:hover { color: var(--text); }
.nav-links .nav-pirashi {
    padding-inline: .85rem;
    border: 1px solid #6e6088;
    border-radius: .65rem;
    color: var(--accent);
}
.nav-pirashi:hover { background: #3a3052; }
.wall-stickers { display: flex; flex-wrap: wrap; gap: .45rem; }
.wall-sticker, .profile-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    gap: .4rem;
    border: 1px solid #645779;
    border-radius: .65rem;
    background: #252138;
    color: #f3eaff;
    transition: border-color .16s ease, background .16s ease;
}
.wall-sticker { padding-inline: .7rem; font-size: .87rem; font-weight: 650; }
.wall-sticker.sticker-post { border-color: #8d6b59; background: #3b2c2a; color: #ffe3bc; }
.profile-contact { width: 2.75rem; }
.wall-sticker:hover, .profile-contact:hover { border-color: #a491bf; background: #3b3053; }
.icon {
    display: block;
    width: 1.3rem;
    height: 1.3rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hero {
    isolation: isolate;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 34%);
    align-items: center;
    gap: clamp(1.8rem, 5vw, 4.25rem);
    padding-block: clamp(2.5rem, 5.6vw, 5.25rem);
}
.hero::before {
    position: absolute;
    inset: 0 0 0 34%;
    z-index: -1;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(#d8d1fb15 1px, transparent 1px),
        linear-gradient(90deg, #d8d1fb15 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: radial-gradient(ellipse at 70% 47%, black 3%, transparent 69%);
}
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: clamp(2.4rem, 6.35vw, 5.1rem); letter-spacing: -.055em; line-height: 1; font-weight: 750; }
.hero h1 > span:last-child { display: block; color: var(--accent); }
.hero-copy > p { color: var(--muted); max-width: 52ch; margin-top: 1.2rem; line-height: 1.65; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.35rem; margin-top: 1.55rem; }
.primary, .secondary { display: inline-flex; align-items: center; gap: .8rem; font-weight: 650; font-size: .95rem; }
.primary { border-radius: .6rem; padding: .8rem 1rem; background: var(--accent); color: #1a122a; }
.primary:hover { background: #eee4ff; }
.secondary { padding-block: .5rem; color: var(--accent); }
.secondary:hover { text-decoration: underline; }
.profile { display: grid; gap: .3rem; justify-items: center; text-align: center; }
.portrait-frame { position: relative; }
.portrait-link { display: block; border-radius: .92rem; }
.portrait {
    display: block;
    width: 69px;
    height: 69px;
    border-radius: .92rem;
    object-fit: cover;
    border: 2px solid #29253f;
    outline: 1px solid #a290c8;
    box-shadow: 0 0 0 .2rem #c2a7fa18, 0 .25rem .7rem #090910aa;
}
.profile figcaption { font-size: .84rem; font-weight: 750; }
.wall-note {
    position: relative;
    display: grid;
    align-content: start;
    gap: .85rem;
    min-height: 13.75rem;
    padding: clamp(1.15rem, 2.6vw, 1.7rem);
    border: 1px solid #e4c69a;
    border-radius: .55rem .95rem .65rem .65rem;
    background: linear-gradient(140deg, #fff0d2, #f8e2b9);
    color: #31243c;
    box-shadow: 0 .55rem 1.4rem #11101b69;
    transform: rotate(1.25deg);
    transition: transform .16s ease, box-shadow .16s ease;
}
.wall-note::before {
    position: absolute;
    inset-block-start: -.44rem;
    inset-inline-start: 43%;
    width: 3.6rem;
    height: .8rem;
    background: #c4a8e4;
    transform: rotate(-7deg);
    content: "";
}
.wall-note:hover, .wall-note:focus-visible {
    transform: none;
    box-shadow: 0 .7rem 1.65rem #11101b85;
}
.wall-note-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .3rem .75rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid #ad8c69;
    font-size: .84rem;
    font-weight: 750;
}
.wall-note-heading > span { color: #695244; font-weight: 600; }
.wall-note-title, .wall-note-text {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
}
.wall-note-title { font-size: clamp(1.2rem, 2.5vw, 1.6rem); line-height: 1.15; -webkit-line-clamp: 2; }
.wall-note-text { color: #493a4a; line-height: 1.5; font-size: .93rem; -webkit-line-clamp: 3; }
.wall-note-text[hidden] { display: none; }
.wall-note-link { display: flex; align-items: center; gap: .35rem; font-weight: 750; font-size: .9rem; }
.wall-note:hover .wall-note-link { text-decoration: underline; text-underline-offset: .2em; }
.projects { border-top: 1px solid var(--line); padding-block: 1.25rem 3.6rem; scroll-margin-top: 1.25rem; }
.projects-header { display: flex; align-items: end; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.projects-title-row { display: flex; align-items: center; gap: .5rem; }
.section-heading h2 { letter-spacing: -.038em; font-size: clamp(1.7rem, 3.5vw, 2.65rem); }
.section-heading p { color: var(--muted); line-height: 1.55; margin-top: .48rem; }
.carousel-controls { display: flex; gap: .55rem; }
.carousel-controls[hidden], .rune[hidden] { display: none; }
.carousel-controls button {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #6b6185;
    border-radius: .55rem;
    background: var(--surface);
    color: var(--text);
    font-size: 1.2rem;
}
.carousel-controls button:hover:not([aria-disabled="true"]) { background: #2c2a40; }
.carousel-controls button[aria-disabled="true"] { opacity: .45; cursor: default; }
.project-rail {
    --carousel-gap: .92rem;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--carousel-gap)) / 3);
    gap: var(--carousel-gap);
    list-style: none;
    margin: 1rem 0 0;
    padding: .3rem 0 .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #6b6185 transparent;
}
.project-rail li { display: flex; scroll-snap-align: start; min-width: 0; }
.project-rail.is-dragging { scroll-snap-type: none; scroll-behavior: auto; }
@media (any-pointer: fine) {
    .project-rail[data-draggable] .project { cursor: grab; user-select: none; }
    .project-rail.is-dragging, .project-rail.is-dragging .project { cursor: grabbing; }
}
.project {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    width: 100%;
    gap: .6rem;
    min-height: 10.7rem;
    padding: 0 0 1rem;
    border: 1px solid var(--line);
    border-radius: .8rem;
    background: var(--surface);
    overflow: hidden;
    transition: border-color .16s ease, background .16s ease;
}
.project:hover { border-color: #a695cb; background: #22243a; }
.project:focus-visible { outline-offset: -4px; }
.project > :not(.project-art) { margin-inline: 1rem; }
.project h3 { font-size: 1.12rem; }
.project p { color: var(--muted); line-height: 1.55; font-size: .92rem; }
.project .action { color: var(--accent); font-size: .9rem; font-weight: 650; }
.pirashi-project {
    border-color: #8b6caf;
    background: radial-gradient(ellipse at 100% 0%, #503c69, transparent 85%), #211d32;
}
.pirashi-project:hover { background-color: #302641; background-image: radial-gradient(ellipse at 100% 0%, #5c4776, transparent 85%); }
.wall-project { border-color: #675582; }
.project-art {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 9;
    min-width: 0;
    overflow: hidden;
    background: #171720;
}
.project-art img { position: absolute; inset: 0; margin: auto; display: block; width: 100%; height: 100%; }
.gameplay-image { object-fit: cover; }
.dice-art { background: radial-gradient(ellipse at 50% 58%, #5b4470, #271e35 72%); }
.dice-art img { width: 72%; height: auto; max-height: 95%; object-fit: contain; }
.pong-art { background: #1c2426; }
.pong-court { position: relative; width: 77%; height: 76%; border-block: 1px solid #8bb5a040; }
.pong-court::before { position: absolute; inset: 0 50% 0 auto; content: ""; border-left: 2px dashed #647b7180; }
.pong-score { position: absolute; inset: 6% 0 auto; text-align: center; color: #b7d9ce; font: clamp(.9rem, 3vw, 1.75rem) monospace; letter-spacing: .28em; }
.pong-bat { position: absolute; width: 5px; height: 41%; border-radius: 2px; background: #b9e2d2; box-shadow: 0 0 20px #b9e2d23b; }
.pong-bat-left { left: 3%; top: 45%; }
.pong-bat-right { right: 3%; top: 19%; }
.pong-ball { position: absolute; left: 61%; top: 63%; width: .65rem; aspect-ratio: 1; border-radius: 50%; background: #ccf0dc; box-shadow: -.75rem 0 #ccf0dc45, -1.45rem 0 #ccf0dc19; }
.memory-art { background: #25212e; }
.memory-tiles { display: grid; width: 39%; max-width: 8.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; transform: rotate(-7deg); }
.memory-tiles span { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #ffffff30; border-radius: .45rem; }
.memory-tiles span:nth-child(1) { background: #663949; color: #f9b6c1; }
.memory-tiles span:nth-child(2) { background: #294d3d; color: #b0e5c6; }
.memory-tiles span:nth-child(3) { background: #2c496b; color: #b6d7fb; }
.memory-tiles span:nth-child(4) { background: #67552c; color: #f6dea0; }
.wall-art { background: #28212f; }
.wall-preview { display: grid; width: 73%; gap: .55rem; justify-items: start; transform: rotate(-6deg); }
.wall-bubble { border: 1px solid #806791; border-radius: .65rem .65rem .65rem .2rem; background: #45354f; padding: .55rem .65rem; color: #eee3f5; font-size: .8rem; }
.wall-bubble + .wall-bubble { justify-self: end; border-radius: .65rem .65rem .2rem .65rem; background: #332c3a; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--muted); border-top: 1px solid var(--line); padding-block: 1.2rem 1.55rem; font-size: .9rem; }
.rune {
    display: inline-grid;
    place-items: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    line-height: 1;
    font-size: 1.3rem;
}
.rune:hover { background: #c2a7fa22; color: var(--text); }
.rune[aria-pressed="true"] { color: #ffe1a2; text-shadow: 0 0 .8rem #ffe1a28c; }
.portrait-rune {
    position: absolute;
    inset-block-start: -.48rem;
    inset-inline-end: -.48rem;
    inline-size: 1.8rem;
    block-size: 1.8rem;
    background: #242035;
}
.rune-progress {
    position: fixed;
    z-index: 2;
    inset-block-end: 1.2rem;
    inset-inline: 1rem;
    margin-inline: auto;
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: .65rem 1rem;
    border: 1px solid #82729b;
    border-radius: .6rem;
    background: #211a32;
    color: var(--text);
    pointer-events: none;
    opacity: 0;
}
.rune-progress:not(:empty) { opacity: 1; }
.secret {
    width: min(42rem, calc(100% - 2rem));
    max-height: calc(100% - 2rem);
    padding: 0;
    border: 1px solid #82729b;
    border-radius: .9rem;
    color: var(--text);
    background: var(--surface);
}
.secret[open] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.secret::backdrop { background: #0a0912dc; }
.secret img { display: block; width: 100%; height: auto; }
.secret-copy { padding: 1.4rem; }
.secret-copy p { margin-block: .5rem 1rem; color: var(--muted); }
.secret-copy button { border: 0; }
@media (max-width: 820px) {
    .project-rail { grid-auto-columns: calc((100% - var(--carousel-gap)) / 2); }
    .nav { column-gap: .95rem; }
}
@media (max-width: 700px) {
    .container { width: calc(100% - 2rem); }
    .nav { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .65rem; }
    .header-identity { gap: .65rem; }
    .nav-links { grid-column: 2; grid-row: 1; column-gap: .5rem; font-size: .9rem; }
    .nav-links .nav-pirashi { padding-inline: .55rem; }
    .wall-stickers { grid-column: 1 / -1; }
    .hero { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding-block: 2rem; }
    .hero::before { inset: 0; }
    .wall-note-panel { width: min(100%, 28rem); }
    .wall-note { min-height: 0; transform: none; }
}
@media (max-width: 620px) {
    .project-rail { grid-auto-columns: 88%; }
    .secret[open] { grid-template-columns: 1fr; }
    .secret img { max-height: 55vh; object-fit: contain; background: #11131d; }
}
@media (max-width: 400px) {
    .project { min-height: 8.5rem; }
    .wall-sticker { padding-inline: .53rem; }
}
@media (max-width: 358px) {
    .nav-links { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .project-rail { scroll-behavior: auto; }
    .project, .wall-sticker, .profile-contact, .wall-note { transition: none; }
}
