@font-face { font-family: "Satisfy"; src: url("../fonts/satisfy.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Beth Ellen"; src: url("../fonts/beth-ellen_normal_400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo_normal_400.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo_italic_400.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/cardo_normal_700.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root { --name-font: "Quicksand", "Ubuntu", system-ui, sans-serif; --accent: #b4572f; --base: #ffffff; --contrast: #242121; --secondary: #6e6e6e; --tertiary: #f0f0f0; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--base); color: var(--contrast); font-family: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.05rem; line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.center { text-align: center; }
.heading-script { font-family: "Beth Ellen", cursive; font-weight: 400; text-transform: lowercase; line-height: 1.4; }

/* nav */
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; justify-content: center; }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* hero */
.hero { position: relative; min-height: 100vh; background-size: cover; background-position: 26% 59%; display: flex; align-items: center; justify-content: center; }
.hero-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.2); }
.hero-inner { position: relative; text-align: center; padding: 2rem; display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.hero-title { margin: 0; font-family: var(--name-font); font-size: clamp(2.4rem, 8vw, 5rem); font-weight: 400; line-height: 1.15; color: var(--contrast); text-shadow: 0 2px 24px rgba(255,255,255,.55); }
.hero-tag { margin: -1rem 0 0; font-size: 1.2rem; letter-spacing: .25em; text-transform: uppercase; color: var(--contrast); opacity: .8; }

/* about */
.about { position: relative; min-height: 100vh; margin: 0 0 3rem; background-size: cover; background-position: 70% 84%; display: flex; align-items: center; }
.about-overlay { position: absolute; inset: 0; background: rgba(133,133,132,0.3); backdrop-filter: grayscale(1) brightness(0.55); -webkit-backdrop-filter: grayscale(1) brightness(0.55); }
.about-inner { position: relative; color: #fff; padding: 3rem clamp(1.5rem, 8vw, 6rem); max-width: 56rem; text-align: left; }
.about-inner h2 { font-size: 2.2rem; margin: 0 0 1rem; line-height: 2; }
.about-inner p { margin: 0 0 1rem; }

/* home blog */
.home-blog { padding: 0 1.5rem; }
.home-blog h2, .home-now .heading-script { font-size: 2.2rem; margin: 2rem 0; }
.home-posts { width: 80%; max-width: 60rem; margin: 0 auto; }
.home-post { display: flex; align-items: center; gap: 2.2rem; margin-bottom: 2.2rem; }
.home-post-thumb { flex: 0 0 min(14rem, 30%); display: block; }
.home-post-thumb img { width: 100%; height: auto; border-radius: 28px; display: block; box-shadow: 0 8px 24px rgba(0,0,0,.12); transition: transform .35s ease, box-shadow .35s ease; }
.home-post:hover .home-post-thumb img { transform: translateY(-4px) scale(1.02); box-shadow: 0 14px 32px rgba(0,0,0,.18); }
.home-post-body .meta { margin-top: .4rem; }
.home-post-title { margin: 0; font-size: 1.6rem; line-height: 1.3; font-weight: 400; }
.home-post-title a { text-decoration: none; }
.home-post-title a:hover { color: var(--secondary); }
.all-posts a { text-decoration: none; border-bottom: 1px solid currentColor; }
.sep { border: 0; border-top: 1px solid var(--contrast); opacity: .2; margin: 3rem auto; width: 80%; }
.home-now { padding: 0 1.5rem 3rem; max-width: 70rem; margin: 0 auto; }

/* shared header (inner pages) */
.site-header { display: flex; flex-wrap: wrap; gap: .6rem 2rem; align-items: center; justify-content: space-between; padding: 1rem clamp(1rem, 4vw, 3rem); }
.site-header.is-dark { background: #000; color: #fff; }
.site-header.is-dark a { color: #fff; }
.site-title { text-decoration: none; font-size: 1.3rem; text-transform: capitalize; }

/* footer */
.site-footer { background: var(--contrast); color: #fff; padding: 2.5rem 4vw; }
.social-links { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: 1.8rem; flex-wrap: wrap; }
.social-links img { filter: invert(1); opacity: .9; display: block; transition: opacity .2s; }
.social-links a:hover img { opacity: 1; }

/* inner pages */
body.home-template .wrap, .wrap { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.tag-template .wrap, .paged .wrap, .blog-index .wrap { max-width: 70rem; }
.page-title, .post-title { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 .5rem; }
.meta { color: var(--secondary); font-size: .95rem; margin: .2rem 0; }
.post-tags a { font-size: .9rem; color: var(--secondary); margin-right: .6rem; text-decoration: none; }
.post-head { margin-bottom: 1.5rem; }
.post-feature { margin: 0 0 2rem; }
.post-feature img { border-radius: 12px; width: 100%; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2rem; align-items: start; }
.card { background: var(--base); border-radius: 20px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.08); transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.card-body { padding: 1.1rem 1.3rem 1.4rem; }
.card-body p { margin: .5rem 0 0; font-size: 1rem; }
.card-thumb { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(255,255,255,.04); }
.card-thumb::before { content: ""; position: absolute; inset: -20px; background: var(--thumb) center / cover; filter: blur(22px) saturate(1.3) brightness(.7); }
.card-thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.card h2 { margin: 0; font-size: 1.35rem; line-height: 1.3; }
.card h2 a { text-decoration: none; }
.pagination, .navigation { display: flex; justify-content: space-between; margin-top: 2rem; }

/* content */
.gh-content > * + * { margin-top: 1.4rem; }
.gh-content h2, .gh-content h3, .gh-content h4 { line-height: 1.3; margin-top: 2.2rem; }
.gh-content a { text-decoration: underline; }
.gh-content blockquote { border-left: 3px solid var(--contrast); margin-left: 0; padding-left: 1.2rem; font-style: italic; }
.gh-content pre { background: var(--tertiary); padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; line-height: 1.5; }
.gh-content hr { border: 0; border-top: 1px solid var(--contrast); opacity: .2; margin: 2.5rem 0; }
.gh-content figure { margin: 2rem 0; }
.gh-content figcaption { text-align: center; color: var(--secondary); font-size: .9rem; }
.gh-content iframe { max-width: 100%; }
.kg-width-wide { width: min(75rem, 94vw); position: relative; left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.kg-width-wide img, .kg-width-full img { width: 100%; }
.kg-image { max-width: 100%; height: auto; }
.kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; flex-direction: row; justify-content: center; }
.kg-gallery-image img { display: block; margin: 0; width: 100%; height: 100%; }
.kg-gallery-row:not(:first-of-type) { margin: .75em 0 0 0; }
.kg-gallery-image:not(:first-of-type) { margin: 0 0 0 .75em; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; width: 100%; }
.sw-gallery { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.sw-gallery img { max-height: 30rem; width: auto; border-radius: 8px; }
.sw-video { position: relative; aspect-ratio: 16/9; width: 100%; }
.sw-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* SOTD */
.sotd { position: relative; min-height: 1700px; background-size: cover; background-position: 51% 0; background-attachment: fixed; }
.sotd-overlay { position: absolute; inset: 0; background: rgba(68,44,37,.4); }
.sotd-inner { position: relative; max-width: 80rem; margin: 0 auto; }

@media (max-width: 700px) {
  .home-posts { width: 100%; }
  .home-post { gap: 1rem; }
  .home-post-thumb { flex-basis: 30%; }
  .home-post-title { font-size: 1.25rem; }
  .sotd { background-attachment: scroll; }
}

/* ---- upgrade: motion, topbar, progress, post nav ---- */
.hero { animation: heroIn 1.2s ease both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.hero-inner > * { animation: rise .9s ease both; }
.hero-inner > *:nth-child(2) { animation-delay: .15s; } .hero-inner > *:nth-child(3) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-overlay { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,.1) 55%, rgba(255,255,255,.35)); }
.scroll-cue { position: absolute; bottom: 1.6rem; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--contrast); border-radius: 14px; opacity: .7; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--contrast); animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.site-nav a { position: relative; padding: .15rem 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: currentColor; transition: width .25s ease; }
.site-nav a:hover::after, .site-nav .nav-current a::after { width: 100%; }
.site-nav a:hover { text-decoration: none; }

.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: center; justify-content: space-between; padding: .7rem clamp(1rem, 4vw, 3rem); background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 18px rgba(0,0,0,.08); transform: translateY(-110%); transition: transform .35s ease; }
.topbar.show { transform: none; }
.topbar .site-title { font-family: var(--name-font); font-size: 1.5rem; text-transform: none; }
.site-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.site-header.is-dark { background: rgba(0,0,0,.88); }
.site-header .site-title { font-family: var(--name-font); font-size: 1.5rem; text-transform: none; }

.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.will-reveal.in { opacity: 1; transform: none; }
.about-inner h2 { font-size: 2.6rem; }
.home-blog h2, .home-now .heading-script { font-size: 2.6rem; }
.home-post-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s ease, color .2s; }
.home-post-title a:hover { background-size: 100% 1px; }
.all-posts a { transition: letter-spacing .25s ease; }
.all-posts a:hover { letter-spacing: .06em; }
.site-footer { background: linear-gradient(180deg, #242121, #141212); }
.social-links a { display: block; transition: transform .2s ease; }
.social-links a:hover { transform: translateY(-4px) scale(1.12); }

.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.post-title { font-size: clamp(2rem, 6vw, 3rem); }
.gh-content > p:first-of-type::first-letter { font-family: "Beth Ellen", cursive; font-size: 3.4rem; float: left; line-height: .9; padding: .25rem .5rem 0 0; color: var(--accent); }
.gh-content img { border-radius: 10px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; }
.pn { display: block; padding: 1rem 1.2rem; border-radius: 14px; background: var(--tertiary); text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.pn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.pn small { display: block; color: var(--secondary); font-size: .85rem; }
.pn span { font-size: 1.05rem; line-height: 1.3; }
.pn-next { grid-column: 2; text-align: right; }
.pn-prev:only-child { grid-column: 1; }
.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; width: 44px; height: 44px; border-radius: 50%; background: var(--contrast); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 1.3rem; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .3s, transform .3s; z-index: 55; }
.to-top.show { opacity: .9; pointer-events: auto; transform: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
@media (max-width: 700px) { .home-post { flex-direction: row; } .post-nav { grid-template-columns: 1fr; } .pn-next { grid-column: 1; } .scroll-cue { display: none; } }
.wrap.wide { max-width: 70rem; }

/* ---- round 3 fixes ---- */
.hero-title { font-weight: 600; font-size: clamp(2rem, 5.5vw, 3.6rem); letter-spacing: .02em; line-height: 1.2; text-shadow: 0 2px 18px rgba(255,255,255,.5); }
.hero-tag { font-family: var(--name-font); font-weight: 500; letter-spacing: .3em; font-size: 1rem; margin-top: -1.2rem; }
.site-title, .topbar .site-title, .site-header .site-title { font-family: var(--name-font); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; }
.page-title { text-align: center; margin: 0 0 2.4rem; padding-top: .6rem; line-height: 1.7; font-size: clamp(2.2rem, 6vw, 3rem); }
.post-feature { margin: 0 0 2rem; text-align: center; left: auto; transform: none; width: auto; position: static; }
.post-feature img { width: auto; max-width: 100%; max-height: 26rem; height: auto; border-radius: 12px; display: inline-block; }

/* ---- chevron scroll cue (replaces mouse-wheel) ---- */
.scroll-cue { width: 36px; height: 44px; margin-left: -18px; border: 0; border-radius: 0; opacity: 1; display: block; animation: bounce 1.8s ease-in-out infinite; }
.scroll-cue span { display: none; }
.scroll-cue i { position: absolute; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-right: 3px solid var(--contrast); border-bottom: 3px solid var(--contrast); transform: rotate(45deg); }
.scroll-cue i:nth-child(1) { top: 2px; opacity: .45; }
.scroll-cue i:nth-child(2) { top: 16px; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

/* ---- round 4: Ubuntu body, rotating tagline ---- */
.gh-content blockquote { font-style: normal; }
.gh-content p, .gh-content li { line-height: 1.8; }
.hero-tag span { display: inline-block; transition: opacity .6s ease, transform .6s ease; }
.hero-tag span.out { opacity: 0; transform: translateY(8px); }
.home-post-title, .card h2 { font-weight: 500; }

/* ---- light / dark mode ---- */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; --base: #121317; --contrast: #ececf1; --secondary: #9a9aa6; --tertiary: #1d1f26; --accent: #e08a5c; }
[data-theme="dark"] body { background: var(--base); color: var(--contrast); }
body { transition: background-color .35s ease, color .35s ease; }
[data-theme="dark"] .hero-overlay { background: linear-gradient(180deg, rgba(8,9,14,.55), rgba(8,9,14,.3) 55%, rgba(8,9,14,.6)); }
[data-theme="dark"] .hero-title { text-shadow: 0 2px 20px rgba(0,0,0,.6); }
[data-theme="dark"] .topbar { background: rgba(18,19,23,.82); box-shadow: 0 2px 18px rgba(0,0,0,.5); }
[data-theme="dark"] .card { background: var(--tertiary); box-shadow: 0 4px 18px rgba(0,0,0,.4); }
[data-theme="dark"] .card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.6); }
[data-theme="dark"] .home-post-thumb img { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
[data-theme="dark"] .gh-content img { filter: brightness(.92); }
[data-theme="dark"] .gh-content pre { background: #1a1c23; }
[data-theme="dark"] .pn { background: var(--tertiary); }
[data-theme="dark"] .to-top { background: var(--contrast); color: var(--base); }
[data-theme="dark"] .site-footer { background: linear-gradient(180deg, #0c0d11, #07080b); }
[data-theme="dark"] .about-overlay { background: rgba(60,60,60,.35); backdrop-filter: grayscale(1) brightness(.5); -webkit-backdrop-filter: grayscale(1) brightness(.5); }
[data-theme="dark"] .dock { box-shadow: 0 24px 60px rgba(0,0,0,.6); }

/* ---- pull cord (as on org.pavanthanuj.com) ---- */
.pull-cord { --rest: 34px; position: fixed; top: 0; right: 18px; width: 40px; height: calc(var(--rest) + 78px); padding: 0; will-change: transform; contain: layout style; border: 0; background: none; cursor: grab; z-index: 80; transform-origin: 50% 0; touch-action: none; -webkit-tap-highlight-color: transparent; animation: cordSway 6s ease-in-out infinite; }
.pull-cord.dragging { cursor: grabbing; animation-play-state: paused; }
.pull-cord:focus { outline: none; }
.pull-cord.swing { animation: cordSwing 1.6s ease-out; }
.cord-string { position: absolute; left: 50%; top: 0; width: 2px; margin-left: -1px; height: var(--rest); transform-origin: 50% 0; transform: scaleY(var(--sy, 1)); will-change: transform; border-radius: 1px; background: linear-gradient(#9a9aa6, #6b6b78); }
.cord-handle { position: absolute; left: 50%; top: var(--rest); translate: 0 var(--pull, 0px); will-change: translate, transform; width: 14px; height: 26px; margin-left: -7px; margin-top: -2px; border-radius: 7px; background: #e9e9ee; border: 1.5px solid #6b6b78; box-shadow: 0 2px 8px rgba(0,0,0,.4); transition: border-color .2s, box-shadow .2s, background .3s; }
[data-theme="dark"] .cord-handle { background: #2a2c35; border-color: #b9b9c6; }
.pull-cord:hover .cord-handle, .pull-cord:focus-visible .cord-handle, .pull-cord.dragging .cord-handle { border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
@keyframes cordSway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
@keyframes cordSwing { 0% { transform: rotate(0); } 15% { transform: rotate(7deg); } 32% { transform: rotate(-5deg); } 50% { transform: rotate(3.5deg); } 68% { transform: rotate(-2deg); } 85% { transform: rotate(1deg); } 100% { transform: rotate(0); } }
.topbar, .site-header { padding-right: 4.2rem; }
@media (prefers-reduced-motion: reduce) { .pull-cord, .pull-cord.swing { animation: none; } }
@media (max-width: 480px) { .pull-cord { --rest: 14px; } .topbar, .site-header { padding-right: 3.4rem; } }

/* ---- footer v2 ---- */
.site-footer { --foot: #1c1a1a; position: relative; margin-top: 5rem; padding: 0; background: var(--foot); color: #e8e6e3; }
[data-theme="dark"] .site-footer { --foot: #0b0c10; background: var(--foot); }
.foot-wave { position: absolute; left: 0; right: 0; top: -79px; width: 100%; height: 80px; fill: var(--foot); display: block; pointer-events: none; }
.foot-inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem clamp(1.2rem, 4vw, 2.5rem) 1.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1.1fr; gap: 2.5rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.foot-name { font-family: var(--name-font); font-weight: 600; font-size: 1.5rem; color: #fff; text-decoration: none; letter-spacing: .01em; }
.foot-tag { margin: .5rem 0 .8rem; font-family: "Beth Ellen", cursive; font-size: 1.15rem; color: #f0b595; line-height: 1.4; }
.foot-blurb { margin: 0; font-size: .92rem; line-height: 1.7; color: rgba(232,230,227,.68); max-width: 26rem; }
.foot-col h4 { margin: 0 0 1rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.foot-col a { color: #e8e6e3; text-decoration: none; font-size: .95rem; transition: color .2s ease, padding-left .2s ease; display: inline-flex; align-items: center; gap: .2rem; }
.foot-col li > a:hover { color: #f0b595; padding-left: .25rem; }
.foot-col small { display: block; margin-top: .1rem; font-size: .76rem; color: rgba(232,230,227,.45); }
.foot-col .material-symbols-outlined, .foot-bottom .material-symbols-outlined { font-size: 16px; vertical-align: middle; }
.social { grid-template-columns: repeat(4, 42px); gap: .7rem !important; }
.social a { width: 42px; height: 42px; padding: 0 !important; border-radius: 50%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); justify-content: center; transition: transform .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.social a i { width: 18px; height: 18px; background: rgba(255,255,255,.82); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; transition: background .25s ease; }
.social a:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); border-color: var(--c); box-shadow: 0 8px 20px rgba(0,0,0,.35), 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); padding-left: 0 !important; color: inherit; }
.social a:hover i { background: var(--c); }
.rss { margin-top: 1.1rem; font-size: .88rem !important; color: rgba(232,230,227,.7) !important; }
.rss:hover { color: #f0b595 !important; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; justify-content: space-between; padding-top: 1.3rem; font-size: .82rem; color: rgba(232,230,227,.55); }
.foot-bottom a { color: inherit; }
.foot-bottom a:hover { color: #f0b595; }
.foot-made { display: inline-flex; align-items: center; gap: .35rem; }
.foot-top { text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.07); transition: background .2s ease, transform .2s ease; }
.foot-top:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }
@media (max-width: 960px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; gap: 2rem; } .foot-bottom { flex-direction: column; align-items: flex-start; } .site-footer { margin-top: 4rem; } }

/* ---- github contributions ---- */
.home-gh { padding: 0 1.5rem 3rem; max-width: 70rem; margin: 0 auto; }
.home-gh .heading-script { font-size: 2.6rem; margin: 2rem 0; }
.gh-card { --g0: rgba(127,127,127,.15); --g1: #9be9a8; --g2: #40c463; --g3: #30a14e; --g4: #216e39; padding: 1.4rem 1.6rem; border-radius: 18px; border: 1px solid rgba(127,127,127,.2); background: rgba(127,127,127,.06); }
[data-theme="dark"] .gh-card { --g1: #0e4429; --g2: #006d32; --g3: #26a641; --g4: #39d353; }
.gh-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.gh-user { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: inherit; }
.gh-user i { width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.gh-total { font-size: .9rem; opacity: .7; }
.gh-scroll { overflow-x: auto; padding-bottom: .4rem; }
.gh-grid { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; margin: 0 auto; }
.gh-grid i { border-radius: 2px; background: var(--g0); }
.gh-grid i.l1 { background: var(--g1); } .gh-grid i.l2 { background: var(--g2); } .gh-grid i.l3 { background: var(--g3); } .gh-grid i.l4 { background: var(--g4); }
.gh-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: .8rem; font-size: .75rem; opacity: .75; }
.gh-legend b { width: 11px; height: 11px; border-radius: 2px; background: var(--g0); display: inline-block; }
.gh-legend .l1 { background: var(--g1); } .gh-legend .l2 { background: var(--g2); } .gh-legend .l3 { background: var(--g3); } .gh-legend .l4 { background: var(--g4); }

/* ---- about v2 ---- */
.about-inner { max-width: 46rem; }
.about-inner p { line-height: 1.75; font-size: 1.05rem; margin: 0 0 1.1rem; }
.about-inner .about-lead { font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.55; font-weight: 500; margin-bottom: 1.4rem; }
.about-inner a { color: #f0b595; text-decoration: underline; text-decoration-color: rgba(240,181,149,.4); text-underline-offset: 3px; }
.about-inner a:hover { text-decoration-color: #f0b595; }

/* ---- gentle snap between homepage sections ---- */
@media (prefers-reduced-motion: no-preference) {
  html:has(body.home-template) { scroll-snap-type: y proximity; }
  body.home-template .hero, body.home-template .about, body.home-template .home-blog, body.home-template .home-now, body.home-template .home-gh, body.home-template .site-footer { scroll-snap-align: start; }
}

/* ---- code section v2 ---- */
.gh-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; font-size: .9rem; }
.gh-stars { font-weight: 600; color: #f0b595; }
.gh-total { opacity: .7; }
.gh-head { margin-bottom: 1.2rem; }
.gh-scroll { overflow: visible; padding-bottom: 0; }
.gh-grid { grid-template-rows: repeat(7, var(--cell, 11px)); grid-auto-columns: var(--cell, 11px); gap: var(--gap, 3px); width: max-content; max-width: 100%; margin: 0 auto; }
.gh-grid i { border-radius: max(2px, calc(var(--cell, 11px) * .2)); }
.gh-lead { margin: 1.6rem 0 .6rem; font-size: 1.05rem; line-height: 1.6; }
.gh-repos { list-style: none; margin: 0 0 .8rem; padding: 0; }
.gh-repos li { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-top: 1px solid rgba(127,127,127,.22); }
.gh-repos li a { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.gh-repos b { display: block; font-weight: 600; }
.gh-repos li a:hover b { color: #f0b595; }
.gh-repos li a span { display: block; font-size: .88rem; line-height: 1.5; opacity: .72; margin-top: .15rem; }
.gh-repos em { font-style: normal; font-weight: 600; color: #f0b595; white-space: nowrap; }
.gh-all { display: inline-flex; align-items: center; gap: .25rem; font-size: .92rem; font-weight: 600; color: #f0b595; text-decoration: none; }
.gh-all .material-symbols-outlined { font-size: 18px; transition: transform .2s ease; }
.gh-all:hover .material-symbols-outlined { transform: translate(2px, -2px); }
@media (max-width: 560px) { .home-gh { padding: 0 1rem 2.5rem; } .gh-card { padding: 1.1rem; } .home-gh .heading-script { font-size: 2.2rem; margin: 1.4rem 0; } }

/* ---- song of the day archive ---- */
.sotd { min-height: 100vh; }
.sotd-app { color: #fff; padding: 6.5rem clamp(1rem, 4vw, 2.5rem) 5rem; max-width: 76rem; }
.sotd-head { text-align: center; margin-bottom: 2rem; }
.sotd-head h1 { font-size: clamp(2.4rem, 7vw, 3.8rem); margin: 0 0 .6rem; line-height: 1.2; }
.sotd-sub { margin: 0 auto; max-width: 38rem; opacity: .85; line-height: 1.6; }
.sotd-latest { max-width: 40rem; margin: 0 auto 2.2rem; padding: 1.2rem; border-radius: 22px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sotd-latest[hidden] { display: none; }
.sotd-kicker { display: block; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; opacity: .7; margin-bottom: .8rem; }
.sotd-latest-body { display: flex; gap: 1.1rem; align-items: center; }
.sotd-latest img { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; flex: none; box-shadow: 0 10px 28px rgba(0,0,0,.45); background: rgba(255,255,255,.08); }
.sotd-latest-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sotd-latest-text b { font-size: 1.3rem; line-height: 1.25; }
.sotd-latest-text span { opacity: .85; }
.sotd-latest-text small { opacity: .6; }
.sotd-play, .sotd-rand, .sotd-more { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-weight: 600; color: #15151a; background: #1ed760; border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; transition: transform .2s ease, filter .2s ease; }
.sotd-play { align-self: flex-start; margin-top: .6rem; }
.sotd-play:hover, .sotd-rand:hover, .sotd-more:hover { transform: translateY(-2px); filter: brightness(1.08); }
.sotd-tools { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: center; justify-content: center; margin-bottom: 1rem; }
.sotd-search { display: flex; align-items: center; gap: .5rem; flex: 1 1 18rem; max-width: 26rem; padding: .55rem 1rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.sotd-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: inherit; }
.sotd-search input::placeholder { color: rgba(255,255,255,.6); }
.sotd-years { display: inline-flex; gap: .4rem; }
.sotd-years button { font: inherit; font-weight: 600; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .45rem .95rem; cursor: pointer; transition: background .2s ease; }
.sotd-years button.on { background: #fff; color: #15151a; }
.sotd-count { text-align: center; opacity: .7; font-size: .9rem; margin: 0 0 1.2rem; }
.sotd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.1rem; }
.sotd-card { all: unset; display: block; width: 100%; box-sizing: border-box; cursor: pointer; border-radius: 16px; padding: .6rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); transition: transform .25s ease, background .25s ease; color: #fff; }
.sotd-card:hover, .sotd-card:focus-visible { transform: translateY(-4px); background: rgba(255,255,255,.15); }
.sotd-card:focus-visible { outline: 2px solid #1ed760; }
.sotd-art { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.1); }
.sotd-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sotd-pl { position: absolute; right: .5rem; bottom: .5rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: #1ed760; color: #15151a; display: grid; place-items: center; opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; font-size: 26px; }
.sotd-card:hover .sotd-pl, .sotd-card:focus-visible .sotd-pl { opacity: 1; transform: none; }
.sotd-meta { display: block; padding: .6rem .2rem .2rem; }
.sotd-meta b { display: block; font-size: .95rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sotd-meta span { display: block; font-size: .82rem; opacity: .75; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sotd-meta small { display: block; font-size: .75rem; opacity: .55; margin-top: .2rem; }
.sotd-more { display: flex; margin: 1.8rem auto 0; }
.sotd-more[hidden] { display: none; }
.sotd-dialog { border: 0; padding: 0; border-radius: 18px; width: min(32rem, 92vw); background: #121212; overflow: visible; }
.sotd-dialog::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
.sotd-dialog iframe { display: block; border-radius: 18px; }
.sotd-x { position: absolute; top: -2.6rem; right: 0; background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 50%; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; cursor: pointer; }
@media (max-width: 560px) { .sotd-latest-body { flex-direction: column; align-items: flex-start; } .sotd-latest img { width: 100%; height: auto; aspect-ratio: 1; max-width: 14rem; } .sotd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; } .sotd-app { padding-top: 5.5rem; } }

/* sotd: readability over the busy neon wall */
.sotd .sotd-overlay { background: linear-gradient(rgba(14,12,16,.82), rgba(14,12,16,.88)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sotd-head h1, .sotd-sub, .sotd-count { text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.sotd-sub { opacity: .92; }
.sotd-search { background: rgba(20,18,26,.82); border-color: rgba(255,255,255,.3); }
.sotd-search input { color: #fff; }
.sotd-search input::placeholder { color: rgba(255,255,255,.72); }
.sotd-years button { background: rgba(20,18,26,.82); border-color: rgba(255,255,255,.3); }
.sotd-years button.on { background: #fff; }
.sotd-latest, .sotd-card { background: rgba(26,24,32,.85); border-color: rgba(255,255,255,.16); }
.sotd-card:hover, .sotd-card:focus-visible { background: rgba(44,41,54,.95); }
.sotd-count { opacity: .85; }

.sotd-h { font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; margin: 2.4rem 0 .4rem; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.sotd-h-arch { margin-top: 3rem; }
.sotd-hint { text-align: center; opacity: .8; margin: 0 0 1.2rem; font-size: .92rem; }
.sotd-recent[hidden] { display: none; }

/* ---- snap: strong from hero -> about -> blog, loose after (mode toggled in main.js) ---- */
@media (prefers-reduced-motion: no-preference) {
  html:has(body.home-template)[data-snap="strong"] { scroll-snap-type: y mandatory; }
  html:has(body.home-template)[data-snap="loose"] { scroll-snap-type: y proximity; }
  body.home-template .hero, body.home-template .about { min-height: 100vh; min-height: 100svh; }
  body.home-template .about { margin-bottom: 0; }
  body.home-template .hero, body.home-template .about, body.home-template .home-blog { scroll-snap-stop: always; }
}

/* fixes: blog heading hidden under the topbar on snap, sotd title overlap, wider player */
body.home-template .home-blog { padding-top: 5rem; }
.sotd-head h1 { line-height: 1.6; padding-bottom: .5rem; margin-bottom: 1rem; }
.sotd-sub { margin-top: .4rem; }
.sotd-dialog { width: min(46rem, 94vw); }
body { overflow-x: clip; }

/* ---- floating scrollbar: the native viewport bar is hidden on mouse devices, a slim overlay thumb replaces it ---- */
:root { --sb-1: 217, 138, 95; --sb-2: 180, 87, 47; }
[data-theme="dark"] { --sb-1: 232, 156, 112; --sb-2: 200, 116, 74; }
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .fsb { position: fixed; top: 0; right: 0; bottom: 0; width: 18px; z-index: 90; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
  .fsb.on, .fsb.drag, .fsb:hover { opacity: 1; }
  .fsb[hidden] { display: none; }
  .fsb-thumb { position: absolute; right: 4px; top: 0; width: 7px; min-height: 48px; border-radius: 999px; background: rgba(var(--sb-2), .85); box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 2px 10px rgba(0,0,0,.25); pointer-events: auto; cursor: grab; transition: width .2s ease, right .2s ease, background .2s ease; touch-action: none; }
  .fsb:hover .fsb-thumb, .fsb.drag .fsb-thumb { width: 11px; right: 3px; background: rgb(var(--sb-1)); }
  .fsb.drag .fsb-thumb { cursor: grabbing; }
}
@media (hover: none), (pointer: coarse) { .fsb { display: none; } }

/* anchors land below the fixed topbar */
#nowplaying { scroll-margin-top: 5.5rem; }
#code { scroll-margin-top: 3rem; }
.home-now, .home-gh { scroll-margin-top: 2.5rem; }
#nowplaying { scroll-margin-top: 8rem; }
.home-now { scroll-margin-top: 5.5rem; }
.home-gh { scroll-margin-top: 4rem; } #code { scroll-margin-top: 5rem; }

/* ---- hero in light mode: unwashed photo, original dark type ---- */
[data-theme="light"] .hero-overlay { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0) 50%, rgba(255,255,255,.04)); }
[data-theme="light"] .hero-title { text-shadow: 0 2px 20px rgba(255,255,255,.4); }
[data-theme="light"] .hero-tag { opacity: .9; text-shadow: 0 1px 12px rgba(255,255,255,.45); }
[data-theme="light"] .hero .site-nav a { font-weight: 500; text-shadow: 0 1px 10px rgba(255,255,255,.45); }

/* name font: Satisfy */
.hero-title, .topbar .site-title, .site-header .site-title, .site-title { font-family: "Satisfy", cursive; font-weight: 400; letter-spacing: 0; }
.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.2; }
.topbar .site-title, .site-header .site-title { font-size: 1.6rem; }

/* mobile: no zoom on the hero entrance (it competed with the pull cord), keep the fade */
@media (hover: none), (pointer: coarse) {
  @keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
  .hero { will-change: opacity; }
  .hero-overlay { transition: none; }
}

.card-thumb.is-wide img { object-fit: cover; }
.card-thumb.is-wide::before { display: none; }

/* centre GIFs and any image narrower than the column */
.gh-content figure { text-align: center; }
.gh-content figure img { display: block; margin-inline: auto; max-width: 100%; height: auto; }
.gh-content .tenor-gif-embed { max-width: 420px; margin: 2rem auto; }
.gh-content .instagram-media, .gh-content iframe.instagram-media { display: block !important; margin: 2rem auto !important; max-width: 540px !important; }

/* logo pairs: light-theme and dark-theme artwork */
.gh-content .logo-dark { display: none; }
[data-theme="dark"] .gh-content .logo-light { display: none; }
[data-theme="dark"] .gh-content .logo-dark { display: inline-block; }

/* Arcade */
.games { min-height: 80vh; padding: 7rem 1.25rem 4rem; background: radial-gradient(120% 90% at 50% 0%, #2b1d4d 0%, #14122b 55%, #0d0d1a 100%); color: #fff; }
.games-inner { max-width: 62rem; margin: 0 auto; }
.games-head { text-align: center; margin-bottom: 2.4rem; }
.games-head h1 { margin: 0; font-size: clamp(2.6rem, 8vw, 4rem); color: #fff; }
.games-sub { margin: .6rem auto 0; max-width: 32rem; color: rgba(255,255,255,.7); }
.games-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.2rem; }
.game-card { margin: 0; }
.game-open { all: unset; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); overflow: hidden; cursor: pointer; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.game-open:hover, .game-open:focus-visible { transform: translateY(-4px); border-color: rgba(196,181,253,.5); box-shadow: 0 16px 36px rgba(0,0,0,.4); }
.game-open:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.game-art { display: flex; align-items: center; justify-content: center; height: 8.5rem; font-size: 3rem; background: linear-gradient(135deg, hsl(var(--hue, 265) 45% 22%), hsl(var(--hue, 265) 55% 38%)); overflow: hidden; }
.game-art.has-thumb { background: #14122b; }
.game-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-body { display: block; padding: .9rem 1rem .3rem; flex: 1; }
.game-body b { display: block; font-size: 1.05rem; margin-bottom: .25rem; }
.game-body small { display: block; font-size: .85rem; line-height: 1.5; color: rgba(255,255,255,.7); }
.game-foot { display: flex; padding: .6rem 1rem .9rem; }
.game-play { margin-left: auto; display: inline-flex; align-items: center; gap: .25rem; font-size: .85rem; font-weight: 700; color: #c4b5fd; }
.games-empty, .games-note { text-align: center; margin: 2rem 0 0; font-size: .9rem; color: rgba(255,255,255,.6); }
.games-note a { color: #c4b5fd; }
.games-search { display: flex; align-items: center; gap: .5rem; width: min(24rem, 100%); margin: 1.4rem auto 0; padding: .55rem .9rem; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.games-search input { all: unset; flex: 1; color: #fff; font-size: .95rem; }
.games-search input::placeholder { color: rgba(255,255,255,.5); }
.game-card[hidden] { display: none; }
.games-viewbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.games-viewbar h2 { flex: 1; margin: 0; font-size: 1.2rem; color: #fff; text-align: center; }
.games-back { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem .45rem .6rem; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: .9rem; }
.games-back:hover { background: rgba(255,255,255,.2); }
.games-actions { display: inline-flex; gap: .2rem; }
.games-actions a, .games-actions button { all: unset; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; cursor: pointer; color: #fff; }
.games-actions a:hover, .games-actions button:hover { background: rgba(255,255,255,.14); }
.games-stage { display: flex; width: 100%; height: min(72vh, 44rem); min-height: 22rem; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.1); }
.games-player { width: 100%; height: 100%; }
.games-loading { margin: auto; color: rgba(255,255,255,.7); }
@media (max-width: 600px) { .games { padding-top: 6rem; } .games-viewbar h2 { font-size: 1rem; } .games-stage { height: 70vh; } }
.games-frame { width: 100%; height: 100%; border: 0; background: #0b1020; }
.game-art.has-thumb img { object-position: center; }
