/* ─────────────────────────────────────────────────────────────
   s11o.me — retro-gothic portfolio
   fonts: Nippo (display + body) / Courbe Sans (about facts) / Blackout (hero)
   ───────────────────────────────────────────────────────────── */

:root {
    /* palette extracted from comission2.jpg */
    --bg: #050102; /* near-black with a red undertone */
    --panel: #0f0306; /* oxblood-black */
    --panel-deep: #090103;
    --ink: #f0e6e4; /* warm rose-white */
    --dim: #b0979a; /* muted rose-gray */
    --blood: #fb0c2c; /* bright red */
    --blood-dark: #730102; /* oxblood */
    --rose: #ef6c71; /* pink highlight */
    --violet: #3b0205; /* deep oxblood glow */
    --line: #241012;
    --font-display: "Blackout Two AM", "Blackout Sunrise";
    --font-body: "Nippo", "Courbe Sans";
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.75;
    letter-spacing: 0.02em;
    overflow-x: hidden;
}

::selection {
    background: var(--blood);
    color: #ffffff;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--blood);
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: #26262e;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--blood-dark);
}

/* film-grain overlay */
.grain {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

/* scanlines overlay (CRT / VHS feel) */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 65;
    pointer-events: none;
    opacity: 0.16;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.9) 0px,
        rgba(0, 0, 0, 0.9) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* ── background eyes: ghost eyes that haunt the void ────────── */

.eyes-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* keep the page content floating above the eyes */
main,
.site-footer {
    position: relative;
    z-index: 1;
}

.bg-eye {
    position: absolute;
    width: var(--eye-size, 36px);
    height: calc(var(--eye-size, 36px) * 0.6);
    opacity: 0;
    pointer-events: auto; /* the eyes can feel the visitor… */
    cursor: pointer;
    filter: drop-shadow(0 0 7px rgba(251, 12, 44, 0.4));
    transition: opacity 1.1s ease;
}

.bg-eye.in {
    opacity: var(--eye-opacity, 0.6);
}

.bg-eye svg {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
}

.bg-eye.blink svg {
    animation: eye-blink 0.26s ease-in-out;
}

@keyframes eye-blink {
    0%,
    100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.12);
    }
}

/* ── cursor cat: a pixel ghost-cat that trails the mouse ────── */

.cursor-cat {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 56px;
    height: 42px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    filter: drop-shadow(0 0 9px rgba(251, 12, 44, 0.3));
    will-change: transform;
}

.cursor-cat.is-active {
    opacity: 1;
}

.cursor-cat-wrap {
    animation: cat-bob 1.9s ease-in-out infinite;
}

.cursor-cat svg {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

.cursor-cat.cat-flip svg {
    transform: scaleX(-1);
}

@keyframes cat-bob {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* no cursor to follow on touch screens */
@media (hover: none), (pointer: coarse) {
    .cursor-cat {
        display: none;
    }
}

/* ── hero ───────────────────────────────────────────────────── */

.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size:
        13px 13px,
        auto,
        auto;
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 12vw, 8.5rem);
    line-height: 1.08;
    margin: 0.3em 0 0.4em;
    color: #ff0a2c;
    letter-spacing: 0.04em;
    text-shadow:
        0 0 18px rgba(251, 12, 44, 0.5),
        0 0 70px rgba(251, 12, 44, 0.25);
    animation: flicker 8s infinite;
    position: relative;
}

.hero-title a {
    display: inline-block;
    color: #ff0a2c;
    background: #000000;
    padding: 0.05em 0.18em;
    text-decoration: none;
    transition:
        color 0.25s ease,
        text-shadow 0.25s ease,
        opacity 0.55s ease;
}

.hero-title a:hover {
    color: var(--rose);
    text-shadow:
        0 0 26px rgba(251, 12, 44, 0.7),
        0 0 90px rgba(251, 12, 44, 0.35);
}

/* ── the bloody word swap: slow bleed, blackout, reappear ───── */

/* blood streams that slowly pour down while the word drowns */
.hero-title::before,
.hero-title::after,
.hero-title a::before,
.hero-title a::after,
.hero::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 0;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(180deg, #fb0c2c, #8f0018);
    box-shadow: 0 0 12px rgba(251, 12, 44, 0.7);
    opacity: 0;
    pointer-events: none;
}

.hero-title::before {
    top: 100%;
    left: 4%;
    --drip-h: 5.6rem;
    --drip-delay: 0.15s;
}

.hero-title::after {
    top: 100%;
    right: 4%;
    --drip-h: 7rem;
    --drip-delay: 0.9s;
}

.hero-title a::before {
    top: 100%;
    left: 20%;
    --drip-h: 8rem;
    --drip-delay: 0.45s;
}

.hero-title a::after {
    top: 100%;
    right: 20%;
    --drip-h: 5rem;
    --drip-delay: 1.15s;
}

.hero::after {
    top: calc(50% + 1.2em);
    left: calc(50% - 2px);
    --drip-h: 7.6rem;
    --drip-delay: 0.7s;
}

.hero.hero-bleed .hero-title::before,
.hero.hero-bleed .hero-title::after,
.hero.hero-bleed .hero-title a::before,
.hero.hero-bleed .hero-title a::after,
.hero.hero-bleed::after {
    animation: blood-drip 1.7s cubic-bezier(0.45, 0, 0.55, 0.45)
        var(--drip-delay, 0s) forwards;
}

@keyframes blood-drip {
    0% {
        opacity: 0;
        height: 0;
    }
    8% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        height: var(--drip-h, 5rem);
    }
}

.hero.hero-bleed .hero-title a {
    animation: title-bleed 1.7s ease-in-out forwards;
    transform-origin: 50% 100%;
}

@keyframes title-bleed {
    0% {
        color: #ff0a2c;
        filter: none;
        transform: none;
    }
    55% {
        color: #ff2146;
        text-shadow:
            0 0 36px rgba(251, 12, 44, 0.95),
            0 0 110px rgba(251, 12, 44, 0.55);
    }
    100% {
        color: #8f0018;
        filter: blur(6px) brightness(1.35);
        transform: scaleY(1.16) translateY(0.12em);
        text-shadow:
            0 0 24px rgba(251, 12, 44, 0.8),
            0 12px 28px rgba(115, 1, 2, 0.9);
    }
}

.hero-blackout {
    position: absolute;
    inset: 0;
    background: #000000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

.hero.hero-dark .hero-blackout {
    opacity: 1;
}

.hero.hero-dark .hero-title a {
    opacity: 0;
}

/* long haunted words shrink a little so they stay one neat block */
.hero-title.hero-title--md {
    font-size: clamp(2.4rem, 10vw, 6.5rem);
}

.hero-title.hero-title--sm {
    font-size: clamp(2rem, 7.5vw, 5rem);
}

/* the glitch that haunts one word into the next */
.hero-word-swap {
    animation: hero-swap 0.5s steps(6) both;
}

@keyframes hero-swap {
    0% {
        opacity: 1;
    }
    25% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.9;
    }
    75% {
        opacity: 0.35;
    }
    100% {
        opacity: 1;
    }
}

@keyframes flicker {
    0%,
    100% {
        opacity: 1;
    }
    91% {
        opacity: 1;
    }
    92% {
        opacity: 0.72;
    }
    93% {
        opacity: 1;
    }
    95% {
        opacity: 0.85;
    }
    96% {
        opacity: 1;
    }
    98% {
        opacity: 0.93;
    }
    99% {
        opacity: 1;
    }
}

/* ── entrance dice modal ─────────────────────────────────────── */

.dice-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(5, 1, 2, 0.58);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: pointer;
    animation: modal-in 0.5s ease both;
}

.dice-modal.done {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

.dice-modal-stage {
    width: min(92vw, 560px);
    display: grid;
    place-items: center;
    padding: 1.5rem;
    animation: stage-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes modal-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes stage-in {
    from {
        transform: scale(1.14);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── 3D die (adapted from the roll-dice project) ───────────── */

.dice3d-wrap {
    perspective: 800px;
    transform: scale(clamp(1.1, 3vw, 1.45));
    filter: drop-shadow(0 0 34px rgba(251, 12, 44, 0.18));
}

.dice3d {
    position: relative;
    width: 100px;
    height: 100px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

@keyframes rolling {
    50% {
        transform: rotateX(455deg) rotateY(455deg);
    }
}

.dice3d-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 4px solid rgba(251, 12, 44, 0.32);
    transform-style: preserve-3d;
    background: linear-gradient(145deg, #1d1f25, #0b0b0e);
}

.dice3d-face::before {
    position: absolute;
    content: "";
    inset: 0;
    border-radius: inherit;
    background: #090103;
    transform: translateZ(-1px);
}

.dice3d-face::after {
    position: absolute;
    content: "";
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ink);
}

.dice3d .front {
    transform: translateZ(50px);
}
.dice3d .back {
    transform: rotateX(180deg) translateZ(50px);
}
.dice3d .top {
    transform: rotateX(90deg) translateZ(50px);
}
.dice3d .bottom {
    transform: rotateX(-90deg) translateZ(50px);
}
.dice3d .right {
    transform: rotateY(90deg) translateZ(50px);
}
.dice3d .left {
    transform: rotateY(-90deg) translateZ(50px);
}

.dice3d .front::after {
    width: 30px;
    height: 30px;
    background: var(--blood);
    box-shadow:
        0 0 16px rgba(251, 12, 44, 0.9),
        0 0 42px rgba(251, 12, 44, 0.5);
    margin: -15px;
}
.dice3d .back::after {
    margin: -35px 0 0 -30px;
    box-shadow:
        40px 0,
        0 25px,
        40px 25px,
        0 50px,
        40px 50px;
}
.dice3d .top::after {
    margin: -30px 0 0 -30px;
    box-shadow: 40px 40px;
}
.dice3d .bottom::after {
    margin: -36px;
    box-shadow:
        26px 26px,
        52px 52px,
        52px 0,
        0 52px;
}
.dice3d .right::after {
    margin: -30px;
    box-shadow:
        40px 0px,
        0px 40px,
        40px 40px;
}
.dice3d .left::after {
    margin: -35px;
    box-shadow:
        25px 25px,
        50px 50px;
}

.dice-note {
    margin: 0;
    color: var(--dim);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    font-style: italic;
}

.scroll-cue {
    position: absolute;
    bottom: 1.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-size: 0.65rem;
}

.scroll-cue span {
    width: 1px;
    height: 34px;
    background: linear-gradient(180deg, var(--blood), transparent);
    animation: cue 2.2s ease-in-out infinite;
}

@keyframes cue {
    0%,
    100% {
        transform: scaleY(0.4);
        transform-origin: top;
        opacity: 0.5;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 1;
    }
}

/* ── sections ───────────────────────────────────────────────── */

.section {
    max-width: 1060px;
    margin: 0 auto;
    padding: 5.5rem 1.5rem;
}

.section-title {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(2.3rem, 5vw, 3.4rem);
    line-height: 1.15;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    margin: 0 0 2.6rem;
    color: #ff0a2c;
    text-shadow:
        0 0 18px rgba(251, 12, 44, 0.45),
        0 0 60px rgba(251, 12, 44, 0.2);
}

.section-title .numeral {
    color: var(--blood);
    font-size: 0.5em;
    text-shadow: 0 0 14px rgba(251, 12, 44, 0.5);
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(251, 12, 44, 0.55),
        rgba(251, 12, 44, 0)
    );
}

.section .lead {
    font-size: 1.45rem;
    color: var(--ink);
}

/* ── about ──────────────────────────────────────────────────── */

.about-layout {
    display: flex;
    align-items: stretch;
    gap: 2.8rem;
}

.about-col {
    flex: 1 1 0;
    min-width: 0;
}

.about-col p {
    margin: 0;
    color: var(--ink);
    font-size: 1.4rem;
    text-align: justify;
    hyphens: auto;
}

/* the intro column stretches to the portrait's height, filling every row */
.about-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.3rem;
}

.about-intro .lead {
    font-size: 1.4rem;
}

/* red s11o.me heading, echoing the hero */
.about-brand {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.1rem, 3.4vw, 3rem);
    line-height: 1;
    color: #ff0a2c;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 16px rgba(251, 12, 44, 0.5),
        0 0 54px rgba(251, 12, 44, 0.25);
}

.about-art {
    flex: none;
    align-self: center;
    width: clamp(300px, 34vw, 460px);
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(251, 12, 44, 0.45);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 0 44px rgba(251, 12, 44, 0.16);
}

.about-art img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* haunted facts live in a red panel at the bottom of the intro column */
.about-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 3.4rem;
    display: flex;
    min-width: 100%;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.55rem;
    color: var(--blood-dark);
}

/* one fact haunts the reader at a time — it appears at a random moment */
.about-facts li {
    display: none;
    min-width: 100%;
    flex-wrap: wrap;
    align-items: start;
    justify-content: start;
    gap: 0.35rem 1.4rem;
    font-size: 1.3rem;
}

.about-facts li.active {
    display: flex;
    animation: fact-in 0.55s steps(6) both;
}

.about-facts b::after {
    color: var(--dim);
    letter-spacing: 0;
    text-shadow: none;
}

.about-facts {
    text-align: right;
    color: var(--blood);
    text-shadow: 0 0 12px rgba(251, 12, 44, 0.35);
}

@keyframes fact-in {
    0% {
        opacity: 0;
    }
    15% {
        opacity: 0.4;
    }
    30% {
        opacity: 0.1;
    }
    45% {
        opacity: 0.85;
    }
    60% {
        opacity: 0.35;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

/* the tech carousel haunts the bottom of the section, scrolling sideways */
.about-carousel {
    margin-top: 2.2rem;
}

.tech-ticker {
    overflow: hidden;
    padding: 1.1rem 0; /* room for the chips to grow on hover without being cut */
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent,
        #000 7%,
        #000 93%,
        transparent
    );
    mask-image: linear-gradient(
        90deg,
        transparent,
        #000 7%,
        #000 93%,
        transparent
    );
}

.tech-ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 26s linear infinite;
}

.tech-ticker:hover .tech-ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.about-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
}

.about-links .link-blood {
    display: inline-flex;
    align-items: center;
    border-bottom: 0;
    padding-bottom: 0;
}

.about-links .link-blood svg {
    width: 2.2rem;
    height: 2.2rem;
    flex: none;
    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

.about-links .link-blood:hover svg {
    filter: drop-shadow(0 0 12px rgba(251, 12, 44, 0.75));
    transform: translateY(-2px);
}

.link-blood {
    color: var(--blood);
    text-decoration: none;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 1rem;
    border-bottom: 1px solid rgba(251, 12, 44, 0.4);
    padding-bottom: 2px;
    transition:
        border-color 0.2s ease,
        text-shadow 0.2s ease;
}

.link-blood:hover {
    border-color: var(--blood);
    text-shadow: 0 0 12px rgba(251, 12, 44, 0.6);
}

.stack-label {
    margin: 0 0 1.4rem;
    color: var(--blood);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 1rem;
}

.stack-chips {
    list-style: none;
    margin: 0;
    padding: 0 1rem 0 0; /* trailing padding keeps the ticker loop seamless */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.stack-chips li {
    position: relative;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid rgba(251, 12, 44, 0.55);
    border-radius: 999px;
    color: var(--blood);
    background: var(--panel-deep);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.stack-chips li svg {
    width: 2.4rem;
    height: 2.4rem;
    display: block;
}

.stack-chips li:hover {
    border-color: var(--blood);
    background: rgba(251, 12, 44, 0.1);
    box-shadow: 0 0 24px rgba(251, 12, 44, 0.3);
    transform: scale(1.06);
}

.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;
}

/* ── cv timeline ────────────────────────────────────────────── */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.8rem;
    border-left: 1px solid rgba(251, 12, 44, 0.35);
}

.timeline-item {
    position: relative;
    padding: 0 0 2.4rem 1.9rem;
}

.timeline-item:last-child {
    padding-bottom: 0.4rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.87rem;
    top: 0.5rem;
    width: 9px;
    height: 9px;
    background: var(--bg);
    border: 2px solid var(--blood);
    transform: rotate(45deg);
}

.timeline-item .year {
    color: var(--blood);
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.timeline-item h3 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.55rem;
    margin: 0.15rem 0 0.3rem;
    color: #ffffff;
}

.timeline-item p {
    margin: 0;
    color: var(--dim);
    font-size: 1.15rem;
}

.cv-note {
    margin-top: 1.4rem;
    color: var(--dim);
    font-size: 1.1rem;
}

.cv-actions {
    display: flex;
    justify-content: center;
    margin-top: 2.6rem;
}

/* the download charm: same winged, floating look as the contact icons */
.cv-download {
    flex-direction: column;
    gap: 0.7rem;
    text-decoration: none;
}

.cv-download .contact-icon {
    animation-delay: -0.7s;
    animation-duration: 3.1s;
}

.cv-download-label {
    font-size: 1rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    transition:
        color 0.12s ease,
        text-shadow 0.12s ease;
}

.cv-download:hover .cv-download-label {
    color: var(--blood);
    text-shadow: 0 0 12px rgba(251, 12, 44, 0.8);
}

.cv-bullets {
    list-style: none;
    align-items: stretch;
    margin: 0.6rem 0 0;
    padding: 0;
}

.cv-bullets li {
    position: relative;
    padding: 0.15rem 0 0.15rem 1.15rem;
    color: var(--dim);
    font-size: 1.15rem;
}

.cv-bullets li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.62em;
    width: 6px;
    height: 6px;
    background: var(--blood);
    transform: rotate(45deg);
}

/* ── projects: one haunted flip card ────────────────────────── */

.project-magic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.project-hint {
    margin: 0;
    color: var(--dim);
    font-size: 0.95rem;
    font-style: italic;
    letter-spacing: 0.08em;
    text-align: center;
}

.magic-scene {
    width: min(560px, 100%);
    perspective: 1100px;
    transition: transform 0.3s ease;
}

.magic-scene:hover {
    transform: translateY(-6px) rotateX(3deg) rotateY(2deg);
}

.magic-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5; /* taller than before */
    --holo-x: 50%;
    --holo-y: 50%;
    border-radius: 0; /* sharp, haunted corners */
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0.1, 0.25, 1);
    /* 3D thickness: dark slabs stacked beneath the card, rotating with it */
    box-shadow:
        0 10px 0 -2px #1a0308,
        0 20px 0 -4px #050102,
        0 34px 60px rgba(0, 0, 0, 0.55),
        0 0 44px rgba(251, 12, 44, 0.12);
}

.magic-card.is-front {
    transform: rotateY(180deg);
}

.magic-card:focus-visible {
    outline: 2px solid var(--blood);
    outline-offset: 6px;
}

.magic-face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* designed inner margin: a thin haunted frame inset inside every face */
.magic-frame {
    position: absolute;
    inset: 0.9rem;
    z-index: 3;
    outline-offset: 5px;
    pointer-events: none;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
    /* blood rivets on the midpoint of every edge */
    background-image:
        radial-gradient(circle at 50% 0%, #fb0c2c 0 2.5px, transparent 3.5px),
        radial-gradient(circle at 50% 100%, #fb0c2c 0 2.5px, transparent 3.5px),
        radial-gradient(circle at 0% 50%, #fb0c2c 0 2.5px, transparent 3.5px),
        radial-gradient(circle at 100% 50%, #fb0c2c 0 2.5px, transparent 3.5px);
}

.magic-scene:hover .magic-frame {
    border-color: rgba(251, 12, 44, 0.8);
    box-shadow: inset 0 0 22px rgba(251, 12, 44, 0.2);
}

/* heavy corner ticks that lock the frame in place */
.magic-frame::before,
.magic-frame::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    border: 0 solid var(--blood);
}

.magic-frame::before {
    top: -1px;
    left: -1px;
    border-top-width: 3px;
    border-left-width: 3px;
}

.magic-frame::after {
    bottom: -1px;
    right: -1px;
    border-bottom-width: 3px;
    border-right-width: 3px;
}

/* ── holographic foil: rainbow coating + a sheen that follows the
      cursor (and drifts on its own whenever the cursor is away) ── */

.magic-holo {
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    opacity: 0.55;
    background:
        repeating-linear-gradient(
            115deg,
            rgba(255, 255, 255, 0.14) 0px,
            rgba(255, 255, 255, 0.14) 1px,
            rgba(255, 255, 255, 0) 1px,
            rgba(255, 255, 255, 0) 4px
        ),
        conic-gradient(
            from 0deg at 50% 50%,
            #ff5f6d 0deg,
            #ffc371 45deg,
            #fff176 90deg,
            #a8ff78 140deg,
            #78ffd6 190deg,
            #5f9fff 240deg,
            #c471ed 290deg,
            #ff6ec7 330deg,
            #ff5f6d 360deg
        );
    animation: holo-hue 14s linear infinite;
}

.magic-holo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        65% 60% at 50% 50%,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.32) 30%,
        rgba(255, 255, 255, 0) 62%
    );
    background-size: 230% 230%;
    background-position: var(--holo-x) var(--holo-y);
    animation: holo-sheen 7.5s ease-in-out infinite;
}

/* once the visitor's cursor is over the card, the sheen obeys it */
.magic-card.is-tracking .magic-holo::before {
    animation: none;
    transition: background-position 0.22s ease-out;
}

/* the void side keeps a fainter coating so the eye still reads */
.magic-face--back .magic-holo {
    opacity: 0.3;
}

@keyframes holo-hue {
    from {
        filter: hue-rotate(0deg);
    }
    to {
        filter: hue-rotate(360deg);
    }
}

@keyframes holo-sheen {
    0%,
    100% {
        background-position: 8% 16%;
    }
    50% {
        background-position: 92% 84%;
    }
}

/* ── the back: a void with a watching eye ───────────────────── */

.magic-face--back {
    background: radial-gradient(
        circle at 50% 44%,
        rgba(63, 3, 10, 0.92) 0%,
        rgba(15, 3, 6, 0.96) 34%,
        #050102 74%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    padding: 2.6rem 2.6rem 2.8rem;
    box-shadow: 0 0 54px rgba(251, 12, 44, 0.16);
}

/* twinkling specks of dust around the eye */
.magic-face--back::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(
            1.6px 1.6px at 18% 22%,
            rgba(251, 12, 44, 0.85),
            transparent 55%
        ),
        radial-gradient(
            1.2px 1.2px at 74% 16%,
            rgba(239, 108, 113, 0.8),
            transparent 55%
        ),
        radial-gradient(
            1.4px 1.4px at 86% 42%,
            rgba(251, 12, 44, 0.7),
            transparent 55%
        ),
        radial-gradient(
            1.1px 1.1px at 12% 68%,
            rgba(239, 108, 113, 0.75),
            transparent 55%
        ),
        radial-gradient(
            1.5px 1.5px at 42% 84%,
            rgba(251, 12, 44, 0.6),
            transparent 55%
        ),
        radial-gradient(
            1.2px 1.2px at 66% 88%,
            rgba(239, 108, 113, 0.7),
            transparent 55%
        ),
        radial-gradient(
            1.3px 1.3px at 30% 10%,
            rgba(251, 12, 44, 0.55),
            transparent 55%
        ),
        radial-gradient(
            1px 1px at 92% 74%,
            rgba(251, 12, 44, 0.8),
            transparent 55%
        );
    animation: magic-stars 2.8s ease-in-out infinite alternate;
    pointer-events: none;
}

/* slow fog turning in the dark */
.magic-face--back::after {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: 0;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(251, 12, 44, 0.07) 40deg,
        transparent 90deg,
        rgba(239, 108, 113, 0.05) 160deg,
        transparent 220deg,
        rgba(251, 12, 44, 0.06) 300deg,
        transparent 360deg
    );
    animation: magic-fog 14s linear infinite;
    pointer-events: none;
}

@keyframes magic-stars {
    from {
        opacity: 0.35;
    }
    to {
        opacity: 1;
    }
}

@keyframes magic-fog {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.magic-eye {
    position: relative;
    z-index: 1;
    width: 60%;
    max-width: 300px;
    aspect-ratio: 1;
    animation: magic-eye-breathe 3.4s ease-in-out infinite;
}

.magic-eye svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

@keyframes magic-eye-breathe {
    0%,
    100% {
        filter: drop-shadow(0 0 16px rgba(251, 12, 44, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(251, 12, 44, 0.85));
    }
}

/* the first click hurts the watching eye: it flashes bright red,
   then everything inside dies to black — and stays that way */
.magic-eye.is-hurt {
    animation: eye-hurt 0.7s cubic-bezier(0.45, 0, 0.55, 1) forwards;
}

.magic-eye.is-hurt .magic-eye-lid {
    animation: eye-lid-die 0.7s ease forwards;
}

.magic-eye.is-hurt .magic-iris {
    animation: eye-iris-die 0.7s ease forwards;
}

.magic-eye.is-hurt .magic-glint {
    animation: eye-glint-die 0.7s ease forwards;
}

.magic-eye.is-hurt .magic-rune-ring {
    animation: eye-ring-die 0.7s ease forwards;
}

.magic-eye.is-hurt .magic-rune-marks {
    animation: none;
}

.magic-eye.is-hurt .magic-rune-marks rect {
    animation: eye-mark-die 0.7s ease forwards;
}

.magic-eye.is-hurt .magic-iris-pulse {
    animation: none;
}

@keyframes eye-hurt {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(251, 12, 44, 0.5));
    }
    18% {
        transform: scale(1.14);
        filter: drop-shadow(0 0 32px rgba(251, 12, 44, 0.95)) brightness(2.6);
    }
    42% {
        transform: scale(0.95);
        filter: drop-shadow(0 0 10px rgba(251, 12, 44, 0.45)) brightness(1);
    }
    100% {
        transform: scale(1);
        filter: none;
    }
}

@keyframes eye-lid-die {
    0% {
        fill: #0c0205;
        stroke: #fb0c2c;
    }
    25% {
        fill: #160409;
        stroke: #ff5f74;
    }
    100% {
        fill: #000000;
        stroke: rgba(251, 12, 44, 0.45);
    }
}

@keyframes eye-iris-die {
    0% {
        fill: #fb0c2c;
        filter: drop-shadow(0 0 5px rgba(251, 12, 44, 0.9));
    }
    30% {
        fill: #ff5f74;
        filter: drop-shadow(0 0 12px rgba(251, 12, 44, 1));
    }
    100% {
        fill: #000000;
        filter: none;
    }
}

@keyframes eye-glint-die {
    0% {
        fill: #ffe9ec;
        opacity: 0.85;
    }
    100% {
        fill: #000000;
        opacity: 0;
    }
}

@keyframes eye-ring-die {
    0% {
        stroke: rgba(251, 12, 44, 0.38);
    }
    100% {
        stroke: rgba(251, 12, 44, 0.16);
    }
}

@keyframes eye-mark-die {
    0% {
        stroke: rgba(251, 12, 44, 0.75);
    }
    100% {
        stroke: rgba(251, 12, 44, 0.28);
    }
}

/* the final dead state (applied instantly for reduced motion) */
.magic-eye.is-dead {
    animation: none;
    filter: none;
}

.magic-eye.is-dead .magic-eye-lid {
    fill: #000000;
    stroke: rgba(251, 12, 44, 0.45);
    animation: none;
}

.magic-eye.is-dead .magic-iris {
    fill: #000000;
    filter: none;
    animation: none;
}

.magic-eye.is-dead .magic-glint {
    fill: #000000;
    opacity: 0;
    animation: none;
}

.magic-eye.is-dead .magic-rune-ring {
    stroke: rgba(251, 12, 44, 0.16);
    animation: none;
}

.magic-eye.is-dead .magic-rune-marks {
    animation: none;
}

.magic-eye.is-dead .magic-rune-marks rect {
    stroke: rgba(251, 12, 44, 0.28);
    animation: none;
}

.magic-eye.is-dead .magic-iris-pulse {
    animation: none;
}

.magic-rune-ring {
    fill: none;
    stroke: rgba(251, 12, 44, 0.38);
    stroke-width: 1.4;
    stroke-dasharray: 4 7;
    transform-box: fill-box;
    transform-origin: center;
    animation: magic-ring-spin 22s linear infinite;
}

.magic-rune-ring--inner {
    stroke: rgba(239, 108, 113, 0.42);
    stroke-width: 1;
    stroke-dasharray: 2 9;
    animation-direction: reverse;
    animation-duration: 30s;
}

.magic-rune-marks {
    transform-box: fill-box;
    transform-origin: center;
    animation: magic-ring-spin 46s linear infinite reverse;
}

.magic-rune-marks rect {
    fill: none;
    stroke: rgba(251, 12, 44, 0.75);
    stroke-width: 1.2;
}

.magic-iris-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: magic-iris-pulse 3.2s ease-in-out infinite;
}

@keyframes magic-iris-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.86);
    }
}

.magic-eye-lid {
    fill: #0c0205;
    stroke: #fb0c2c;
    stroke-width: 1.6;
    filter: drop-shadow(0 0 6px rgba(251, 12, 44, 0.8));
}

.magic-iris {
    fill: #fb0c2c;
    filter: drop-shadow(0 0 5px rgba(251, 12, 44, 0.9));
}

.magic-pupil {
    fill: #050102;
}

.magic-glint {
    fill: #ffe9ec;
    opacity: 0.85;
}

.magic-back-caption {
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: center;
    color: rgba(240, 230, 228, 0.5);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.magic-back-caption span {
    color: rgba(251, 12, 44, 0.85);
    margin: 0 0.5rem;
    text-shadow: 0 0 9px rgba(251, 12, 44, 0.7);
}

/* slow ward-circles turning behind the eye */
.magic-halo {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 0;
    width: 82%;
    aspect-ratio: 1;
    border: 1px dashed rgba(251, 12, 44, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: magic-ring-spin 44s linear infinite;
}

.magic-halo--inner {
    width: 68%;
    border-style: dotted;
    border-color: rgba(239, 108, 113, 0.26);
    animation-direction: reverse;
    animation-duration: 60s;
}

/* corner sigils that keep the card warded */
.magic-sigil {
    position: absolute;
    z-index: 2;
    color: rgba(251, 12, 44, 0.72);
    font-size: 1.05rem;
    line-height: 1;
    text-shadow: 0 0 10px rgba(251, 12, 44, 0.6);
    pointer-events: none;
    animation: sigil-pulse 3.6s ease-in-out infinite;
}

.magic-sigil--tl {
    top: 2.2rem;
    left: 2.6rem;
}
.magic-sigil--tr {
    top: 2.2rem;
    right: 2.6rem;
    animation-delay: -1.2s;
}
.magic-sigil--bl {
    bottom: 2.2rem;
    left: 2.6rem;
    animation-delay: -2.4s;
}
.magic-sigil--br {
    bottom: 2.2rem;
    right: 2.6rem;
    animation-delay: -0.8s;
}

@keyframes sigil-pulse {
    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ── the front: one project at a time ───────────────────────── */

.magic-face--front {
    transform: rotateY(180deg);
    background:
        linear-gradient(160deg, rgba(251, 12, 44, 0.07), transparent 42%),
        radial-gradient(circle at 50% 0%, #170407 0%, var(--panel) 58%);
    padding: 2.6rem 2.6rem 3rem;
    display: flex;
    flex-direction: column;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.55),
        inset 0 0 8px rgba(251, 12, 44, 0.1),
        0 0 44px rgba(251, 12, 44, 0.14);
}

/* targeting brackets live on the inner frame now */

/* ghost numeral that numbers each project */
.magic-face--front .card-index {
    position: absolute;
    top: 1.6rem;
    right: 1.8rem;
    z-index: 2;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.12em;
    color: rgba(251, 12, 44, 0.9);
    text-shadow: 0 0 12px rgba(251, 12, 44, 0.45);
    border: 1px solid rgba(251, 12, 44, 0.5);
    background: rgba(251, 12, 44, 0.08);
    padding: 0.28rem 0.7rem;
    box-shadow:
        inset 0 0 12px rgba(251, 12, 44, 0.12),
        0 0 12px rgba(251, 12, 44, 0.22);
    pointer-events: none;
}

.magic-face--front .thumb {
    aspect-ratio: 16 / 9;
    margin: 0.35rem 0 1.2rem;
    background: var(--panel-deep);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    flex: none;
    box-shadow:
        inset 0 0 26px rgba(0, 0, 0, 0.7),
        0 10px 24px rgba(0, 0, 0, 0.45);
}

/* vignette that sinks the artwork into the card */
.thumb-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow:
        inset 0 0 34px rgba(0, 0, 0, 0.8),
        inset 0 0 6px rgba(251, 12, 44, 0.22);
}

.magic-face--front .thumb::before,
.magic-face--front .thumb::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    pointer-events: none;
}

.magic-face--front .thumb::before {
    top: 9px;
    left: 9px;
    border: 2px solid rgba(251, 12, 44, 0.6);
    border-right: 0;
    border-bottom: 0;
}

.magic-face--front .thumb::after {
    bottom: 9px;
    right: 9px;
    border: 2px solid rgba(251, 12, 44, 0.6);
    border-left: 0;
    border-top: 0;
}

.magic-face--front .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.magic-face--front h3 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.6rem;
    margin: 0 0 0.6rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

/* diamond bullet + trailing rule that turn the title into a plaque line */
.magic-face--front h3::before {
    content: "◆";
    flex: none;
    color: var(--blood);
    font-size: 0.5em;
    text-shadow: 0 0 10px rgba(251, 12, 44, 0.8);
}

.magic-face--front h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        rgba(251, 12, 44, 0.5),
        rgba(251, 12, 44, 0)
    );
}

.magic-face--front p {
    margin: 0 0 1.1rem;
    color: var(--dim);
    font-size: 1.05rem;
    flex: 1;
}

/* small summoning tags for the project's stack */
.project-stack {
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-stack li {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rose);
    border: 1px solid rgba(251, 12, 44, 0.35);
    background: rgba(251, 12, 44, 0.07);
    padding: 0.18rem 0.65rem;
}

.magic-face--front .card-link {
    align-self: flex-start;
    color: var(--blood);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.9rem;
    transition: text-shadow 0.2s ease;
}

.magic-face--front .card-link::before {
    content: "✦ ";
    color: var(--rose);
}

.magic-face--front .card-link:hover {
    text-shadow: 0 0 12px rgba(251, 12, 44, 0.65);
}

/* the red filament that ignites when the visitor reaches for the card */
.magic-filament {
    position: absolute;
    left: 1.15rem;
    right: 1.15rem;
    bottom: 1rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--blood) 18%,
        var(--rose) 50%,
        var(--blood) 82%,
        transparent
    );
    box-shadow: 0 0 14px rgba(251, 12, 44, 0.6);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
    pointer-events: none;
}

.magic-scene:hover .magic-filament {
    transform: scaleX(1);
}

/* ── roll the dice ──────────────────────────────────────────── */

.roll-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.8rem;
    padding: 2.4rem 1rem 1rem;
}

.roll-stage .dice3d {
    cursor: pointer;
    animation: spin-die 4s linear infinite;
}

@keyframes spin-die {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* ── contact ────────────────────────────────────────────────── */

.contact-banner {
    text-align: center;
    padding: 3.2rem 1.6rem;
}

/* the summoning pills, carried by flapping bat wings */
.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.contact-links .link-blood,
.cv-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 1.6rem 2.4rem;
    letter-spacing: 0.22em;
    color: var(--ink);
    transition:
        background 0.12s ease,
        color 0.12s ease,
        box-shadow 0.12s ease,
        transform 0.12s ease;
}

.contact-links .link-blood:hover,
.cv-download:hover {
    background: rgba(251, 12, 44, 0.14);
    color: var(--blood);
    box-shadow:
        0 0 34px rgba(251, 12, 44, 0.55),
        inset 0 0 18px rgba(251, 12, 44, 0.18);
    transform: translateY(-3px);
}

/* icon + wings float together through the dark */
.contact-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: contact-fly 2.9s ease-in-out infinite;
}

.contact-links .link-blood:nth-child(2) .contact-icon {
    animation-delay: -1.1s;
    animation-duration: 3.5s;
}

.contact-links .link-blood:nth-child(3) .contact-icon {
    animation-delay: -2.1s;
    animation-duration: 2.4s;
}

.contact-icon > svg:not(.contact-wing) {
    width: 3.5rem;
    height: 3.5rem;
    flex: none;
    display: block;
    color: var(--ink);
    transition:
        color 0.12s ease,
        filter 0.12s ease,
        transform 0.12s ease;
}

/* the bat wings that carry each icon through the dark */
.contact-wing {
    position: absolute;
    width: 3.1rem;
    height: 1.85rem;
    fill: #26040a;
    stroke: rgba(251, 12, 44, 0.5);
    stroke-width: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(251, 12, 44, 0.25));
    transition:
        fill 0.12s ease,
        stroke 0.12s ease,
        filter 0.12s ease;
}

.contact-wing--left {
    top: calc(50% - 0.95rem);
    right: calc(100% - 0.1rem);
    transform-origin: 96% 50%;
    animation: wing-flap-left 0.52s ease-in-out infinite;
}

.contact-wing--right {
    top: calc(50% - 0.95rem);
    left: calc(100% - 0.1rem);
    transform-origin: 4% 50%;
    animation: wing-flap-right 0.52s ease-in-out infinite;
}

@keyframes contact-fly {
    0%,
    100% {
        transform: translateY(-5px) rotate(-2deg);
    }
    50% {
        transform: translateY(5px) rotate(2deg);
    }
}

@keyframes wing-flap-left {
    0%,
    100% {
        transform: rotate(10deg);
    }
    50% {
        transform: rotate(-24deg) scaleY(0.8);
    }
}

@keyframes wing-flap-right {
    0%,
    100% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(24deg) scaleY(0.8);
    }
}

/* hover: the whole charm freezes mid-flight and bleeds */
.contact-links .link-blood:hover .contact-icon,
.cv-download:hover .contact-icon {
    animation-play-state: paused;
}

.contact-links .link-blood:hover .contact-wing,
.cv-download:hover .contact-wing {
    animation-play-state: paused;
    fill: var(--blood);
    stroke: #ff5f74;
    filter: drop-shadow(0 0 12px rgba(251, 12, 44, 0.95));
}

.contact-links .link-blood:hover .contact-icon > svg:not(.contact-wing),
.cv-download:hover .contact-icon > svg:not(.contact-wing) {
    color: var(--blood);
    filter: drop-shadow(0 0 16px rgba(251, 12, 44, 0.9));
    transform: translateY(-2px);
}

/* ── footer ─────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid rgba(251, 12, 44, 0.2);
    text-align: center;
    padding: 2.2rem 1.5rem 2.6rem;
    color: var(--dim);
}

.site-footer p {
    margin: 0.2rem 0;
}

.site-footer .footnote {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #6d6456;
}

.site-footer .footer-brand {
    color: var(--blood);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(251, 12, 44, 0.35);
    transition:
        color 0.2s ease,
        text-shadow 0.2s ease;
}

.site-footer .footer-brand:hover {
    color: var(--rose);
    text-shadow: 0 0 16px rgba(251, 12, 44, 0.7);
}

/* ── reveal on scroll ───────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── responsive ─────────────────────────────────────────────── */

/* tablets: stack the portrait above the text so nothing gets pinched */
@media (max-width: 980px) {
    .about-layout {
        flex-direction: column;
        gap: 2.2rem;
    }

    .about-art {
        align-self: center;
        width: min(440px, 86vw);
    }
}

@media (max-width: 720px) {
    .about-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .about-art {
        width: min(400px, 86vw);
    }

    .about-carousel {
        margin-top: 2.6rem;
    }

    .about-facts li {
        justify-content: center;
    }

    .about-col p {
        text-align: left;
    }

    .magic-card {
        aspect-ratio: auto;
        height: 36rem;
    }

    .magic-frame {
        inset: 0.6rem;
    }

    .magic-face--front {
        padding: 2rem 1.8rem 2.5rem;
    }

    .magic-face--back {
        padding: 2rem 1.8rem 2.2rem;
        gap: 0.9rem;
    }

    .magic-face--front h3 {
        font-size: 1.3rem;
    }

    .magic-face--front p {
        font-size: 0.95rem;
    }

    .project-hint {
        text-align: center;
    }

    .contact-banner {
        padding: 2.4rem 1.2rem;
    }

    .contact-links {
        gap: 1.4rem;
    }

    .contact-links .link-blood {
        flex: 1 1 100%;
        justify-content: center;
        padding: 1rem 2.8rem;
    }

    .hero {
        padding-top: 5.5rem;
    }

    .section {
        padding: 4rem 1.2rem;
    }

    .section-title {
        gap: 0.8rem;
    }
}

/* ── reduced motion ─────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-title,
    .scroll-cue span {
        animation: none;
    }

    .dice-modal,
    .dice-modal-stage {
        animation: none;
    }

    .dice3d {
        transition: none;
        animation: none !important;
    }

    .tech-ticker-track {
        animation: none;
    }

    .tech-ticker-track .stack-chips[aria-hidden="true"] {
        display: none;
    }

    .cursor-cat-wrap {
        animation: none;
    }

    .bg-eye.blink svg {
        animation: none;
    }

    .about-facts li.active {
        animation: none;
    }

    .contact-icon,
    .contact-wing,
    .magic-eye,
    .magic-holo,
    .magic-holo::before,
    .magic-rune-ring,
    .magic-rune-marks,
    .magic-iris-pulse,
    .magic-halo,
    .magic-sigil,
    .magic-face--back::before,
    .magic-face--back::after {
        animation: none;
    }

    .magic-card {
        transition: none;
    }

    .magic-eye.is-hurt {
        animation: none;
    }

    .magic-scene:hover {
        transform: none;
    }

    .dice-modal.done {
        transition: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── fonts ──────────────────────────────────────────────────── */

@font-face {
    font-family: "Blackout Midnight";
    src:
        url("../fonts/blackout_master/blackout_midnight-webfont.woff")
            format("woff"),
        url("../fonts/blackout_master/blackout_midnight-webfont.ttf")
            format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Blackout Sunrise";
    src:
        url("../fonts/blackout_master/blackout_sunrise-webfont.woff")
            format("woff"),
        url("../fonts/blackout_master/blackout_sunrise-webfont.ttf")
            format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Blackout Two AM";
    src:
        url("../fonts/blackout_master/blackout_two_am-webfont.woff")
            format("woff"),
        url("../fonts/blackout_master/blackout_two_am-webfont.ttf")
            format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Courbe Sans";
    src:
        url("../fonts/courbe_sans/CourbeSans.ttf.ttf") format("truetype"),
        url("../fonts/courbe_sans/CourbeSans.otf.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nippo";
    src:
        url("../fonts/nippo_complete/Nippo-Extralight.woff2") format("woff2"),
        url("../fonts/nippo_complete/Nippo-Extralight.woff") format("woff"),
        url("../fonts/nippo_complete/Nippo-Extralight.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nippo";
    src:
        url("../fonts/nippo_complete/Nippo-Light.woff2") format("woff2"),
        url("../fonts/nippo_complete/Nippo-Light.woff") format("woff"),
        url("../fonts/nippo_complete/Nippo-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nippo";
    src:
        url("../fonts/nippo_complete/Nippo-Regular.woff2") format("woff2"),
        url("../fonts/nippo_complete/Nippo-Regular.woff") format("woff"),
        url("../fonts/nippo_complete/Nippo-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nippo";
    src:
        url("../fonts/nippo_complete/Nippo-Medium.woff2") format("woff2"),
        url("../fonts/nippo_complete/Nippo-Medium.woff") format("woff"),
        url("../fonts/nippo_complete/Nippo-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nippo";
    src:
        url("../fonts/nippo_complete/Nippo-Bold.woff2") format("woff2"),
        url("../fonts/nippo_complete/Nippo-Bold.woff") format("woff"),
        url("../fonts/nippo_complete/Nippo-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
