/* ==========================================================
   FILM BACKGROUND — shared by all pages
   - flat white background
   - animated film grain over everything, like the photo
   ========================================================== */

html {
    background-color: #fff;
}

body {
    background-color: transparent !important;
    position: relative;
}

/* Film grain */
body::after {
    content: "";
    position: fixed;
    inset: -100px;
    z-index: 1000;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 220px 220px;
    opacity: 0.06;
    mix-blend-mode: multiply;
    animation: film-grain 0.9s steps(6) infinite;
}

@keyframes film-grain {
    0%   { transform: translate(0, 0); }
    17%  { transform: translate(-40px, 25px); }
    33%  { transform: translate(30px, -45px); }
    50%  { transform: translate(-25px, -15px); }
    67%  { transform: translate(45px, 35px); }
    83%  { transform: translate(-50px, 10px); }
    100% { transform: translate(0, 0); }
}

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
    body::after { animation: none; }
}

/* Chinese name next to "Yidi Zheng" — same red and size,
   in a bold Chinese sans-serif that matches the monospace weight */
.name-zh {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
    font-weight: 700;
    margin-left: 0.5em;
    letter-spacing: 0.05em;
}

/* The name "Yidi Zheng 郑一荻" — identical on every page */
h1 {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 2rem;
    font-weight: bold;
    color: #D8321F;
    white-space: nowrap;
}
