/* =====================================================================
   HOME PAGE: MY OWN STUFF FIRST   (/home-mine.css, with /javascripts/home-mine.js)

   1. "Made by me": big live cards for my own work (photos, blog,
      posters, documents, about me, In Focus). Each one shows the
      newest thing from that page, so it never needs editing.
   2. The short hello: a few lines that light up word by word as you
      scroll, with a little heart walking down the side. The whole
      original note is still there under "Read the whole note".
   3. "Everything else": every other page as a small app icon.
   4. A "Menu" button that floats in once you scroll down, so any page
      is one tap away.

   Colours: warm paper, ink, and my red (#8a2b1d). Everything sits
   still for people who prefer less motion.
   ===================================================================== */

body.hm-page {
    --hm-ink: #1b1a17;
    --hm-muted: #6b665c;
    --hm-faint: #a29b8f;
    --hm-line: #e7e1d6;
    --hm-paper: #fffdf9;
    --hm-red: #8a2b1d;
    --hm-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
    --hm-shout: "Anton", "Bebas Neue", "League Gothic", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    --hm-ease: cubic-bezier(.2, .8, .2, 1);
    --hm-r: 22px;
}

/* a soft warm glow at the top of the page */
body.hm-page::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 900px; pointer-events: none;
    background:
        radial-gradient(700px 420px at 12% 18%, rgba(244, 214, 196, 0.45), transparent 70%),
        radial-gradient(800px 480px at 88% 30%, rgba(214, 226, 240, 0.45), transparent 70%);
}

/* shared little bits */
.hm-kicker:not(#_) {
    display: inline-flex; align-items: center; gap: 8px; margin: 0;
    font: 0.74rem/1 var(--hm-serif); letter-spacing: 0.3em; text-transform: uppercase; color: var(--hm-red);
}
.hm-kicker svg { width: 13px; height: 13px; fill: currentColor; animation: hm-beat 2.6s ease-in-out infinite; }
@keyframes hm-beat { 0%, 70%, 100% { transform: scale(1); } 78% { transform: scale(1.25); } 86% { transform: scale(0.95); } }

/* things that drift up softly when they come into view */
.js .hm-rise { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--hm-ease), transform 0.9s var(--hm-ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js .hm-rise.is-in { opacity: 1; transform: none; }

/* =====================================================================
   1. MADE BY ME
   ===================================================================== */
.hm-mine { margin: 26px 0 0; font-family: var(--hm-serif); color: var(--hm-ink); }

.hm-mine-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 30px; margin-bottom: 22px; }
.hm-mine-head > div { max-width: 62rem; }
.hm-mine-head .hm-mine-badges { margin-top: 16px; }
.hm-hello:not(#_) {
    margin: 12px 0 0; padding: 0; border: 0; background: none;
    font: 400 clamp(2rem, 4.2vw, 3.1rem)/1.06 var(--hm-serif); letter-spacing: -0.02em; color: var(--hm-ink);
    animation: none;
}
.hm-hello em { font-style: italic; color: var(--hm-red); }
.hm-sub:not(#_) { margin: 10px 0 0; font: italic 1.08rem/1.5 var(--hm-serif); color: var(--hm-muted); }
.hm-mine-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-mine-badges li {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid var(--hm-line); border-radius: 999px;
    background: rgba(255, 255, 255, 0.7); font-size: 0.82rem; color: var(--hm-muted); white-space: nowrap;
}
.hm-mine-badges i { --pc: rgba(63, 138, 82, 0.5); width: 7px; height: 7px; border-radius: 50%; background: #3f8a52; animation: hm-ping 2.4s ease-out infinite; }
.hm-mine-badges li:nth-child(2) i { --pc: rgba(138, 43, 29, 0.45); background: var(--hm-red); animation-delay: 0.8s; }
.hm-mine-badges li:nth-child(3) i { --pc: rgba(201, 138, 43, 0.45); background: #c98a2b; animation-delay: 1.6s; }
@keyframes hm-ping { 0% { box-shadow: 0 0 0 0 var(--pc); } 70%, 100% { box-shadow: 0 0 0 7px rgba(0, 0, 0, 0); } }

/* ---- the bento of cards ---- */
.hm-bento {
    display: grid; gap: 16px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: 282px 282px 236px;
}
.hm-photo { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.hm-blog { grid-column: 8 / span 5; grid-row: 1; }
.hm-post { grid-column: 8 / span 5; grid-row: 2; }
.hm-about { grid-column: 1 / span 4; grid-row: 3; }
.hm-focus { grid-column: 5 / span 4; grid-row: 3; }
.hm-docs { grid-column: 9 / span 4; grid-row: 3; }

.hm-card {
    --wash: #f6f1e8; --ink: var(--hm-ink); --sub: var(--hm-muted);
    position: relative; isolation: isolate; overflow: hidden; min-width: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 22px 24px; border-radius: var(--hm-r);
    background: var(--wash); color: var(--ink);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 1px 2px rgba(40, 30, 10, 0.05), 0 14px 34px -22px rgba(40, 30, 10, 0.35);
    transition: transform 0.6s var(--hm-ease), box-shadow 0.6s var(--hm-ease);
}
/* cards come in one after another when the page opens */
.js .hm-card { opacity: 0; transform: translateY(30px) scale(0.985); }
.js .hm-bento.is-in .hm-card {
    opacity: 1; transform: none;
    transition: opacity 0.9s var(--hm-ease) calc(var(--i) * 90ms), transform 1s var(--hm-ease) calc(var(--i) * 90ms), box-shadow 0.6s var(--hm-ease);
}
.js .hm-bento.is-in.is-settled .hm-card { transition: transform 0.6s var(--hm-ease), box-shadow 0.6s var(--hm-ease); }
.hm-bento.is-settled .hm-card:hover, .hm-card:focus-within { transform: translateY(-5px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 4px rgba(40, 30, 10, 0.05), 0 30px 50px -26px rgba(40, 30, 10, 0.45); }

/* a soft light that follows the mouse across a card */
.hm-card::after {
    content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity 0.4s ease;
    background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.28), transparent 60%);
}
.hm-card:hover::after { opacity: 1; }

/* the whole card is one link; links inside sit above it */
.hm-cover { position: absolute; inset: 0; z-index: 2; border-radius: inherit; font-size: 0; color: transparent; text-decoration: none; }
.hm-cover:focus-visible { outline: 3px solid var(--hm-red); outline-offset: 3px; }
.hm-card .hm-in-link { position: relative; z-index: 4; }

/* the label at the bottom of every card */
.hm-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-top: auto; }
.hm-ico {
    flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    background: var(--ico-wash, #fff); color: var(--ico-ink, var(--hm-ink)); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    transition: transform 0.5s var(--hm-ease);
}
.hm-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-card:hover .hm-ico { transform: rotate(-8deg) scale(1.08); }
.hm-name { display: block; font-size: 1.28rem; line-height: 1.15; letter-spacing: -0.005em; }
.hm-what { display: block; margin-top: 3px; font-size: 0.86rem; font-style: italic; color: var(--sub); line-height: 1.35; }
.hm-go {
    flex: none; margin-left: auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid currentColor; color: var(--ink); opacity: 0.55;
    transition: transform 0.5s var(--hm-ease), background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
    transform: rotate(-45deg);
}
.hm-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hm-card:hover .hm-go { transform: none; opacity: 1; background: var(--ink); border-color: var(--ink); color: var(--wash); }

/* ---------------- My Photography: a slow slideshow ---------------- */
.hm-photo { --wash: #20262c; --ink: #fff; --sub: rgba(255, 255, 255, 0.78); padding: 26px 28px; }
.hm-slides { position: absolute; inset: 0; z-index: -1; background: #2b3138; }
.hm-slides img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
    transform: scale(1.1); transition: opacity 1.6s ease, transform 8s linear;
}
.hm-slides img.is-on { opacity: 1; transform: scale(1); }
.hm-photo::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 12, 16, 0.38) 0%, rgba(10, 12, 16, 0) 30%, rgba(10, 12, 16, 0) 52%, rgba(10, 12, 16, 0.72) 100%);
}
.hm-photo .hm-name { font-size: 1.7rem; }
.hm-photo .hm-ico { --ico-wash: rgba(255, 255, 255, 0.92); --ico-ink: #2f5a7a; }
.hm-photo .hm-go { border-color: rgba(255, 255, 255, 0.7); }
.hm-photo:hover .hm-go { background: #fff; color: #20262c; border-color: #fff; }
.hm-photo-top { position: absolute; z-index: 1; left: 28px; right: 28px; top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; }
.hm-photo-cap { font-style: italic; font-size: 0.95rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(-4px); transition: opacity 0.6s ease, transform 0.6s ease; }
.hm-photo-cap.is-on { opacity: 0.95; transform: none; }
.hm-bars { display: flex; gap: 5px; }
.hm-bars i { width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.hm-bars i::after { content: ""; display: block; height: 100%; width: 0; background: #fff; }
.hm-bars i.is-done::after { width: 100%; }
.hm-bars i.is-on::after { animation: hm-bar var(--t, 5.5s) linear forwards; }
@keyframes hm-bar { to { width: 100%; } }
.hm-photo-count { font-variant-numeric: tabular-nums; }

/* ---------------- My Blogs: the newest post ---------------- */
.hm-blog { --wash: #f7efe0; --sub: #7a6a4e; --ico-wash: #fff; justify-content: flex-start; }
.hm-blog .hm-ico { --ico-ink: #8a6a2f; }
.hm-blog-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: #8a6a2f; }
.hm-blog-top > span { letter-spacing: 0.04em; text-transform: none; font-style: italic; font-size: 0.86rem; color: #a08a62; }
.hm-blog-top b { font-weight: normal; }
.hm-blog-title:not(#_) {
    position: relative; z-index: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    margin: 18px 0 10px; font: italic 400 1.5rem/1.22 var(--hm-serif); color: var(--hm-ink); letter-spacing: -0.01em;
    text-decoration: none; background: none; border: 0; max-width: 30em;
}
.hm-blog-title:not(#_):hover { color: #6b4f1e; }
/* the slow turning from one post to the next */
#hm-blog-kick, .hm-blog-title:not(#_), .hm-blog-text:not(#_), #hm-blog-when { transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease; }
.hm-blog .is-out:not(#_) { opacity: 0; transform: translateY(6px); filter: blur(2px); }
.hm-blog-top b { display: inline-flex; align-items: center; gap: 10px; }
.hm-blog-tick { position: relative; display: inline-block; width: 34px; height: 2px; border-radius: 2px; background: rgba(138, 106, 47, 0.2); overflow: hidden; }
.hm-blog-tick[hidden] { display: none; }
.hm-blog-tick::after { content: ""; position: absolute; inset: 0; width: 0; background: #8a6a2f; opacity: 0.7; }
.hm-blog-tick.is-on::after { animation: hm-bar var(--t, 8s) linear forwards; }
.hm-blog-tick.is-paused::after { animation-play-state: paused; }
.hm-blog-text:not(#_) {
    position: relative; z-index: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    margin: 0 0 16px; font-size: 0.95rem; line-height: 1.55; color: #6a604f; max-width: 36em;
}
.hm-blog-more { position: relative; z-index: 1; display: flex; flex-wrap: nowrap; gap: 6px; margin: 12px 0 14px; padding: 0; list-style: none; overflow: hidden; }
.hm-blog-more li { min-width: 0; max-width: 50%; flex: 0 1 auto; }
.hm-blog > * { flex-shrink: 0; }
.hm-blog-more a {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 11px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(138, 106, 47, 0.18);
    font-size: 0.82rem; color: #5e5443; text-decoration: none; transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.hm-blog-more a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hm-blog-more a::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #8a6a2f); }
.hm-blog-more a:hover { background: #fff; color: var(--hm-ink); transform: translateY(-1px); }
.hm-blog .hm-label { margin-top: auto; }

/* ---------------- Art Posters: dark, loud ---------------- */
.hm-post { --wash: #121110; --ink: #f2efe8; --sub: #a39d92; justify-content: flex-end; }
.hm-post::before {   /* film grain */
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.16; 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hm-post .hm-ico { --ico-wash: #2a2622; --ico-ink: #ff5a4f; box-shadow: none; }
.hm-post-shout {
    position: relative; z-index: 1; margin: 0 0 auto; max-width: 58%;
    font: 400 clamp(1.9rem, 3vw, 2.6rem)/0.92 var(--hm-shout); letter-spacing: 0.01em; text-transform: uppercase; color: #f2efe8;
}
.hm-post-shout span { color: #e5322d; }
.hm-post-tag { display: block; margin-top: 8px; font: italic 0.92rem/1.35 var(--hm-serif); text-transform: none; letter-spacing: 0; color: #a39d92; }
.hm-post-wall { position: absolute; z-index: 0; right: 7%; top: 9%; bottom: -14%; width: 36%; pointer-events: none;  }
.hm-post-wall img {
    position: absolute; right: 0; top: 0; height: 100%; width: auto; max-width: 100%; object-fit: cover; border-radius: 3px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55); transform-origin: 50% 100%;
    transition: transform 0.8s var(--hm-ease), opacity 0.8s ease, filter 0.8s ease;
}
.hm-post-wall img:nth-child(1) { transform: translateX(-30%) rotate(-8deg) scale(0.9); opacity: 0.45; filter: grayscale(1) brightness(0.7); }
.hm-post-wall img:nth-child(2) { transform: rotate(4deg); }
.hm-post:hover .hm-post-wall img:nth-child(1) { transform: translateX(-46%) rotate(-12deg) scale(0.9); opacity: 0.7; }
.hm-post:hover .hm-post-wall img:nth-child(2) { transform: rotate(0deg) translateY(-8px) scale(1.03); }
.hm-post-tape { position: absolute; z-index: 1; top: -6px; right: 30%; width: 54px; height: 16px; background: rgba(229, 50, 45, 0.85); transform: rotate(6deg); pointer-events: none; }
.hm-post:hover .hm-go { background: #e5322d; border-color: #e5322d; color: #fff; }

/* ---------------- About Me ---------------- */
.hm-about { --wash: #f9e4e7; --sub: #8e5a66; }
.hm-about .hm-ico { --ico-ink: #b0475f; }
.hm-me { position: absolute; z-index: 0; right: 20px; top: 20px; width: 112px; height: 112px; }
.hm-me img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 5px #fff, 0 12px 26px -10px rgba(120, 40, 60, 0.5); transition: transform 0.6s var(--hm-ease); }
.hm-me::before {   /* a turning ring of little dashes */
    content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1.5px dashed rgba(176, 71, 95, 0.4);
    animation: hm-turn 30s linear infinite;
}
.hm-about:hover .hm-me img { transform: scale(1.05) rotate(-3deg); }
@keyframes hm-turn { to { transform: rotate(360deg); } }
.hm-hi { position: relative; z-index: 1; margin: 0 0 auto; font: italic 1.5rem/1.15 var(--hm-serif); color: #6b2c3b; }
.hm-hi span { display: inline-block; transform-origin: 70% 80%; }
.hm-about:hover .hm-hi span { animation: hm-wave 1.2s ease-in-out; }
@keyframes hm-wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(14deg); } 40%, 80% { transform: rotate(-8deg); } }

/* ---------------- In Focus: comes into focus ---------------- */
.hm-focus { --wash: #1d211c; --ink: #fff; --sub: rgba(255, 255, 255, 0.78); }
.hm-focus .hm-ico { --ico-wash: rgba(255, 255, 255, 0.92); --ico-ink: #3f6b4a; }
.hm-focus .hm-go { border-color: rgba(255, 255, 255, 0.7); }
.hm-focus:hover .hm-go { background: #fff; color: #1d211c; border-color: #fff; }
.hm-focus-img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(0.9); transform: scale(1.12); transition: filter 1.6s var(--hm-ease) 0.4s, transform 2.2s var(--hm-ease) 0.4s; }
.hm-bento.is-in .hm-focus-img.is-ready { filter: none; transform: scale(1.02); }
.hm-focus:hover .hm-focus-img { transform: scale(1.07); }
.hm-focus::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.7)); }
.hm-brackets { position: absolute; z-index: 1; inset: 18px; pointer-events: none; opacity: 0.85; transition: inset 0.7s var(--hm-ease); }
.hm-brackets i { position: absolute; width: 16px; height: 16px; border: 0 solid #fff; }
.hm-brackets i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.hm-brackets i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.hm-brackets i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.hm-brackets i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.hm-focus:hover .hm-brackets { inset: 30px; }
.hm-focus-dot { position: absolute; z-index: 1; top: 30px; right: 32px; display: flex; align-items: center; gap: 6px; font: 0.68rem/1 ui-monospace, Menlo, monospace; letter-spacing: 0.12em; color: #fff; opacity: 0.9; }
.hm-focus-dot i { width: 7px; height: 7px; border-radius: 50%; background: #7ed389; box-shadow: 0 0 8px #7ed389; }
.hm-focus .hm-label { z-index: 1; }

/* ---------------- Documents: a fan of papers ---------------- */
.hm-docs { --wash: #e8ebf4; --sub: #56628a; }
.hm-docs .hm-ico { --ico-ink: #3e4f7a; }
.hm-fan { position: absolute; z-index: 0; right: 26px; top: 18px; width: 150px; height: 118px; }
.hm-fan span {
    position: absolute; left: 50%; bottom: 0; width: 82px; height: 108px; margin-left: -41px; border-radius: 4px; overflow: hidden;
    background: #fff center / cover no-repeat; box-shadow: 0 1px 2px rgba(30, 40, 80, 0.12), 0 10px 20px -10px rgba(30, 40, 80, 0.45);
    transform-origin: 50% 110%; transition: transform 0.7s var(--hm-ease);
}
.hm-fan span:nth-child(1) { transform: rotate(-14deg) translateX(-10px); }
.hm-fan span:nth-child(2) { transform: rotate(-2deg); }
.hm-fan span:nth-child(3) { transform: rotate(11deg) translateX(10px); }
.hm-docs:hover .hm-fan span:nth-child(1) { transform: rotate(-24deg) translateX(-18px); }
.hm-docs:hover .hm-fan span:nth-child(2) { transform: rotate(-3deg) translateY(-8px); }
.hm-docs:hover .hm-fan span:nth-child(3) { transform: rotate(20deg) translateX(18px); }
.hm-fan span.is-blank { background-image: repeating-linear-gradient(180deg, transparent 0 9px, #dfe3ee 9px 10px); background-size: 70% 70%; background-position: 50% 60%; }
.hm-cats { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 auto; padding: 0; list-style: none; max-width: 48%; }
.hm-cats li { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); font-size: 0.74rem; color: #3e4f7a; }
.hm-cats li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--c, #3e4f7a); vertical-align: 1px; }

/* =====================================================================
   2. THE SHORT HELLO, lit up as you scroll
   ===================================================================== */
.hm-story { position: relative; margin: 90px 0 30px; padding-left: 54px; max-width: 58rem; font-family: var(--hm-serif); }
.hm-rail { position: absolute; left: 14px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--hm-line); }
.hm-rail i { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(var(--hm-red), #c0563f); }
.hm-rail svg {
    position: absolute; left: 50%; top: calc(var(--p, 0) * 100%); width: 20px; height: 20px; margin: -10px 0 0 -10px;
    fill: var(--hm-red); filter: drop-shadow(0 2px 4px rgba(138, 43, 29, 0.35)); transition: transform 0.4s ease;
}
.hm-story.is-done .hm-rail svg { animation: hm-beat 1.4s ease-in-out 2; }
.hm-story .hm-kicker { margin-bottom: 18px; }
.hm-lines { margin: 0; }
.hm-line:not(#_) {
    margin: 0 0 0.55em; font: 400 clamp(1.45rem, 3.1vw, 2.35rem)/1.22 var(--hm-serif); letter-spacing: -0.012em; color: var(--hm-ink);
}
.hm-line .w { transition: opacity 0.35s ease, color 0.35s ease; }
.js .hm-story.is-armed .hm-line .w { opacity: 0.16; }
.js .hm-story.is-armed .hm-line .w.on { opacity: 1; }
.hm-line em { font-style: italic; color: var(--hm-red); }
.hm-line b { font-weight: 400; font-style: italic; color: var(--hm-red); }
.hm-line .hm-no { white-space: nowrap; }

.hm-long { margin-top: 26px; font-size: 1rem; }
.hm-long summary {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 8px 16px; border: 1px solid var(--hm-line); border-radius: 999px;
    font-size: 0.92rem; color: var(--hm-muted); background: var(--hm-paper); transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.hm-long summary::-webkit-details-marker { display: none; }
.hm-long summary::after { content: "+"; font-size: 1.1rem; line-height: 1; transition: transform 0.3s ease; }
.hm-long[open] summary::after { transform: rotate(45deg); }
.hm-long summary:hover { background: var(--hm-ink); border-color: var(--hm-ink); color: #fff; }
.hm-long-body { margin-top: 16px; padding: 18px 22px; border-left: 2px solid var(--hm-red); background: linear-gradient(90deg, #fbf6ee, transparent); border-radius: 0 14px 14px 0; animation: hm-open 0.5s var(--hm-ease); }
.hm-long-body p:not(#_) { font-size: 1.05rem; color: #2d2a25; }
@keyframes hm-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   3. EVERYTHING ELSE: a little app drawer
   ===================================================================== */
.hm-more { margin: 40px 0 34px; font-family: var(--hm-serif); }
.hm-more-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.hm-more-head span { font-size: 0.88rem; font-style: italic; color: var(--hm-faint); }
nav.hm-dock:not(#_) { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0; }
nav.hm-dock:not(#_) a {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0;
    border: 1px solid var(--hm-line); border-radius: 16px; background: var(--hm-paper); color: var(--hm-ink);
    font-size: 0.98rem; line-height: 1.2; text-decoration: none; box-shadow: none; transform: none;
    transition: transform 0.4s var(--hm-ease), box-shadow 0.4s var(--hm-ease), border-color 0.3s ease, background-color 0.3s ease;
}
nav.hm-dock:not(#_) a:hover, nav.hm-dock:not(#_) a:focus-visible {
    transform: translateY(-3px); border-color: transparent; background: #fff; color: var(--hm-ink);
    box-shadow: 0 16px 30px -18px rgba(40, 30, 10, 0.45), 0 0 0 1px rgba(40, 30, 10, 0.06);
}
nav.hm-dock a .d-ico {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: var(--w, #f3eee5); color: var(--k, var(--hm-ink)); transition: transform 0.45s var(--hm-ease);
}
nav.hm-dock a .d-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
nav.hm-dock a:hover .d-ico { transform: translateY(-2px) rotate(-6deg) scale(1.08); }
nav.hm-dock a .d-txt { min-width: 0; }
nav.hm-dock a .d-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.hm-dock a .d-sub { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.76rem; font-style: italic; color: var(--hm-faint); }
nav.hm-dock a.is-yt .d-ico { background: #ff0033; color: #fff; }
nav.hm-dock a .d-live { position: absolute; top: 9px; right: 10px; width: 6px; height: 6px; border-radius: 50%; background: #e0322a; animation: hm-blink 1.6s ease-in-out infinite; }
@keyframes hm-blink { 50% { opacity: 0.25; } }

/* =====================================================================
   4. THE FLOATING MENU
   ===================================================================== */
.hm-fab {
    position: fixed; z-index: 60; left: 50%; bottom: max(20px, env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px 11px 14px; border: 0; border-radius: 999px; cursor: pointer;
    background: rgba(27, 26, 23, 0.92); color: #fff; font: 1rem/1 var(--hm-serif);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.5);
    opacity: 0; transform: translate(-50%, 20px) scale(0.9); pointer-events: none;
    transition: opacity 0.45s var(--hm-ease), transform 0.45s var(--hm-ease), background-color 0.3s ease;
}
.hm-fab.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.hm-fab:hover { background: var(--hm-red); }
.hm-fab svg { width: 16px; height: 16px; fill: #ff6b6b; transition: transform 0.4s var(--hm-ease); }
.hm-fab:hover svg { fill: #fff; transform: scale(1.2); }
.hm-fab:focus-visible { outline: 3px solid var(--hm-red); outline-offset: 3px; }

.hm-sheet { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 18px; visibility: hidden; font-family: var(--hm-serif); }
.hm-sheet.is-open { visibility: visible; }
.hm-sheet-bg { position: absolute; inset: 0; background: rgba(27, 26, 23, 0.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.35s ease; }
.hm-sheet.is-open .hm-sheet-bg { opacity: 1; }
.hm-sheet-box {
    position: relative; width: min(440px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 18px 18px 14px; border-radius: 24px;
    background: rgba(255, 253, 249, 0.97); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.45);
    opacity: 0; transform: translateY(24px) scale(0.97); transform-origin: 50% 100%; transition: opacity 0.35s var(--hm-ease), transform 0.45s var(--hm-ease);
}
.hm-sheet.is-open .hm-sheet-box { opacity: 1; transform: none; }
.hm-sheet-top { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; }
.hm-sheet-x { width: 34px; height: 34px; border: 1px solid var(--hm-line); border-radius: 50%; background: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--hm-ink); }
.hm-sheet-x:hover { background: var(--hm-ink); color: #fff; }
.hm-sheet h4 { margin: 14px 6px 8px; font: 0.7rem/1 var(--hm-serif); letter-spacing: 0.26em; text-transform: uppercase; color: var(--hm-faint); }
.hm-sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hm-sheet-grid a {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; color: var(--hm-ink); text-decoration: none; font-size: 0.98rem;
    opacity: 0; transform: translateY(8px); transition: background-color 0.2s ease, opacity 0.4s var(--hm-ease), transform 0.4s var(--hm-ease);
    transition-delay: calc(var(--i, 0) * 25ms);
}
.hm-sheet.is-open .hm-sheet-grid a { opacity: 1; transform: none; }
.hm-sheet-grid a:hover { background: #f3eee5; }
.hm-sheet-grid a .d-ico, .hm-sheet-grid a .hm-ico { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--w, #f3eee5); color: var(--k, var(--hm-ink)); box-shadow: none; }
.hm-sheet-grid a .hm-ico { background: var(--ico-wash); color: var(--ico-ink); border-radius: 50%; }
.hm-sheet-grid svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hm-sheet-grid .d-sub { display: none; }
.hm-sheet-up { display: block; width: 100%; margin-top: 12px; padding: 10px; border: 1px solid var(--hm-line); border-radius: 14px; background: #fff; cursor: pointer; font: 0.95rem var(--hm-serif); color: var(--hm-muted); }
.hm-sheet-up:hover { background: var(--hm-ink); color: #fff; }
html.hm-locked, html.hm-locked body { overflow: hidden; }
html.hm-locked .ls-up, html.hm-locked .ls-line { opacity: 0 !important; pointer-events: none !important; }

/* the rest of the home page drifts in as you reach it */
.js .hm-page .hm-later { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--hm-ease), transform 0.9s var(--hm-ease); }
.js .hm-page .hm-later.is-in { opacity: 1; transform: none; }

/* =====================================================================
   SMALLER SCREENS
   ===================================================================== */
@media (max-width: 1100px) {
    nav.hm-dock:not(#_) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .hm-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; }
    .hm-bento > .hm-card { grid-column: auto; grid-row: auto; min-height: 250px; }
    .hm-photo { grid-column: 1 / -1 !important; min-height: 420px !important; }
    .hm-blog { grid-column: 1 / -1 !important; }
}
@media (max-width: 700px) {
    .hm-mine { margin-top: 14px; }
    .hm-mine-head { margin-bottom: 16px; }
    .hm-hello:not(#_) { font-size: clamp(1.9rem, 9vw, 2.5rem); }
    .hm-sub:not(#_) { font-size: 1rem; }
    .hm-mine-head .hm-mine-badges { gap: 6px; margin-top: 12px; }
    .hm-mine-badges li { padding: 4px 10px; font-size: 0.76rem; gap: 6px; }
    .hm-bento { gap: 12px; }
    .hm-card { padding: 16px 16px; border-radius: 20px; }
    .hm-bento > .hm-card { min-height: 0; }
    .hm-photo { min-height: 0 !important; aspect-ratio: 1 / 1.05; padding: 18px; }
    .hm-photo-top { left: 18px; right: 18px; top: 16px; }
    .hm-photo .hm-name { font-size: 1.45rem; }
    .hm-blog-title:not(#_) { font-size: 1.35rem; }
    .hm-blog-more a span { max-width: 12em; }
    .hm-bento > .hm-post { grid-column: 1 / -1; min-height: 240px; }
    .hm-blog-top span { display: none; }
    .hm-post-shout { max-width: 55%; }
    .hm-post-wall { right: 4%; width: 44%; }
    .hm-post .hm-name, .hm-post .hm-what { text-shadow: 0 1px 2px #121110, 0 0 14px #121110, 0 0 24px #121110; }
    /* the small cards side by side: picture on top, name under it */
    .hm-about, .hm-focus, .hm-docs { min-height: 210px !important; padding: 14px; }
    .hm-bento > .hm-docs { grid-column: 1 / -1; min-height: 190px; }
    .hm-about .hm-what, .hm-focus .hm-what { display: none; }
    .hm-about .hm-go, .hm-focus .hm-go { display: none; }
    .hm-name { font-size: 1.12rem; }
    .hm-ico { width: 32px; height: 32px; }
    .hm-ico svg { width: 16px; height: 16px; }
    .hm-label { gap: 9px; }
    .hm-me { left: 50%; right: auto; top: 26px; width: 84px; height: 84px; margin-left: -42px; }
    .hm-hi { display: none; }
    .hm-brackets { inset: 12px; }
    .hm-focus-dot { top: 22px; right: 22px; }
    .hm-fan { right: 16px; top: 14px; transform: scale(0.85); transform-origin: 100% 0; }
    .hm-cats { max-width: 52%; }

    .hm-story { margin: 60px 0 20px; padding-left: 34px; }
    .hm-rail { left: 6px; }
    .hm-line:not(#_) { font-size: 1.42rem; line-height: 1.28; }

    .hm-more-head span { display: none; }
    nav.hm-dock:not(#_) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    nav.hm-dock:not(#_) a { flex-direction: column; justify-content: center; gap: 7px; padding: 14px 6px 12px; text-align: center; font-size: 0.86rem; border-radius: 18px; }
    nav.hm-dock a .d-ico { width: 44px; height: 44px; border-radius: 14px; }
    nav.hm-dock a .d-ico svg { width: 22px; height: 22px; }
    nav.hm-dock a .d-name { white-space: normal; }
    nav.hm-dock a .d-sub { display: none; }

    .hm-sheet { padding: 0; justify-content: center; }
    .hm-sheet-box { width: 100%; border-radius: 24px 24px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); transform: translateY(100%); transform-origin: 50% 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .js .hm-card, .js .hm-rise, .js .hm-page .hm-later { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hm-slides img { transition: opacity 0.01s; transform: none !important; }
    .hm-kicker svg, .hm-me::before, .hm-mine-badges i, .hm-bars i::after, nav.hm-dock a .d-live { animation: none !important; }
    .hm-focus-img { filter: none !important; transform: none !important; transition: none !important; }
    .js .hm-story.is-armed .hm-line .w { opacity: 1; }
}
