/* kalpeshsnd.com — shared styles
   Day: a clear Sahyadri afternoon. Night: the same ridge under a crescent moon. */

:root {
  --bg: #eef0ea;
  --ink: #1d2521;
  --muted: #5b6660;
  --line: #d3d8cf;
  --green: #2f5d45;
  --marigold: #d9961c;

  /* scene: golden-hour afternoon */
  --sky1: #4f86bd; --sky2: #bcd5e2; --sky3: #f3d39f; --sky4: #f2a86b;
  --far1: #c9cfcf; --far2: #a7b5b0;
  --mid1: #7f9c87; --mid2: #4f7560;
  --near1: #3d6550; --near2: #26453a;
  --ledge1: #2b3a33; --ledge2: #16211c;
  --cloud1: #f7f0e6; --cloud2: #f2b77f;
  --glow: #ffd28a; --rim: #ffc77a;
  --mist: rgba(255, 240, 220, .55);
  --tree: #2a4d3b;
  --shrine: #fbf3e2;
  --trail: rgba(255, 244, 220, .85);
  --figure: #121b17;
  --tent: #c0652c;
  --hero-ink: #142019;
  --hero-link: #1f4a34;

  --serif: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", Arimo, sans-serif;   /* Arial everywhere */
  --sans: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", Arimo, sans-serif;
  color-scheme: light;
}

:root[data-theme="night"] {
  --bg: #12181e;
  --ink: #e2e6e3;
  --muted: #929ea0;
  --line: #27313a;
  --green: #8cc3a2;
  --marigold: #e9b44c;

  /* scene: moonlit night */
  --sky1: #03070f; --sky2: #0f1d3d; --sky3: #22365f; --sky4: #34497a;
  --far1: #253455; --far2: #1c2a46;
  --mid1: #18243d; --mid2: #111a2d;
  --near1: #0e1726; --near2: #0a111c;
  --ledge1: #0b121c; --ledge2: #05090f;
  --cloud1: transparent; --cloud2: transparent;
  --glow: transparent; --rim: #9fb6e6;
  --mist: rgba(130, 155, 200, .2);
  --tree: #0a121e;
  --shrine: #2a3550;
  --trail: rgba(190, 205, 235, .16);
  --figure: #03060b;
  --tent: #262838;
  --hero-ink: #eef1f4;
  --hero-link: #ffd27a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background-color .6s ease, color .6s ease;
}

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }
main, .site-footer { max-width: 42rem; }

a { color: var(--green); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--sans); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: .2em 0 .35em; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; margin: 2.8rem 0 .9rem; }
h3 { font-size: 1.15rem; margin: 0 0 .2rem; }
p { margin: 0 0 1.05em; }

/* ---------- header ---------- */
.topbar { position: relative; z-index: 3; }
.home .topbar { position: absolute; top: 0; left: 0; right: 0; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.3rem; padding-bottom: 1.3rem; flex-wrap: wrap;
}
.brand { font-family: var(--sans); font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand .first { font-weight: 700; }
.brand .last { font-weight: 400; color: var(--muted); }
.home .brand { color: var(--hero-ink); }
.home .brand .last { color: var(--hero-ink); opacity: .72; }

.nav { display: flex; gap: 1.2rem; align-items: center; font-family: var(--sans); font-size: 1rem; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; }
.home .nav a { color: var(--hero-ink); opacity: .82; }
.nav a:hover, .home .nav a:hover { color: var(--ink); opacity: 1; }
.home .nav a:hover { color: var(--hero-ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 2px; text-underline-offset: .35em; }

.theme-toggle {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted);
}
.home .theme-toggle { color: var(--hero-ink); }
.theme-toggle:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.theme-toggle svg { grid-area: 1 / 1; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: opacity .3s ease, transform .5s ease; }
.theme-toggle .i-moon { fill: currentColor; stroke: none; }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="night"] .theme-toggle .i-sun { opacity: 1; transform: none; }
:root[data-theme="night"] .theme-toggle .i-moon { opacity: 0; transform: rotate(90deg) scale(.6); }

/* ---------- hero scene ---------- */
.hero {
  position: relative; overflow: hidden;
  height: min(88vh, 46rem); min-height: 34rem;
  background: var(--sky1);
  color: var(--hero-ink);
  transition: background-color .9s ease, color .9s ease;
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.art { position: absolute; inset: 0; }
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 78% 100%; transition: opacity .9s ease; }
.hero-text { position: relative; z-index: 1; padding-top: 7.5rem; }
.hero-text > * { max-width: 30rem; }
.hero-text p { font-size: 1.15rem; }
.hero-text .lede { font-size: 1.3rem; }
.hero a { color: var(--hero-link); }

.scene * { transition: fill .9s ease, stop-color .9s ease, stroke .9s ease, opacity .9s ease; }
.c-sky1 { stop-color: var(--sky1); } .c-sky2 { stop-color: var(--sky2); }
.c-sky3 { stop-color: var(--sky3); } .c-sky4 { stop-color: var(--sky4); }
.c-far1 { stop-color: var(--far1); } .c-far2 { stop-color: var(--far2); }
.c-mid1 { stop-color: var(--mid1); } .c-mid2 { stop-color: var(--mid2); }
.c-near1 { stop-color: var(--near1); } .c-near2 { stop-color: var(--near2); }
.c-ledge1 { stop-color: var(--ledge1); } .c-ledge2 { stop-color: var(--ledge2); }
.c-cloud1 { stop-color: var(--cloud1); } .c-cloud2 { stop-color: var(--cloud2); }
.c-glow { stop-color: var(--glow); } .c-rim { stop-color: var(--rim); }
.rim { stroke: var(--rim); opacity: .8; }
:root[data-theme="night"] .rim { opacity: .35; }
.rim-fig { stroke: var(--rim); opacity: .9; }
:root[data-theme="night"] .rim-fig { stroke: #ffb04a; opacity: .7; }
.mist { fill: var(--mist); }
.haze-band { fill: rgba(255, 236, 210, .7); }
.trees { fill: var(--tree); }
.birds { stroke: var(--figure); }
.shrine { fill: var(--shrine); }
.flag { fill: var(--marigold); }
.trail { stroke: var(--trail); }
.houses { fill: var(--shrine); }
.tent { fill: var(--tent); }
.tent-door { fill: rgba(0,0,0,.35); }
.traveller, .lantern { fill: var(--figure); stroke: var(--figure); }
.traveller path, .traveller circle, .traveller rect { stroke: none; }
.traveller .rim-fig { stroke: var(--rim); }
:root[data-theme="night"] .traveller .rim-fig { stroke: #ffb04a; }
.lantern-flame { fill: #ffd27a; }
.moon { fill: #eef1fb; }
.stars circle { fill: #f3f1ea; }
.lights circle { fill: #ffd27a; }
.tent-light { fill: #ffc861; }
.grain { opacity: .16; mix-blend-mode: overlay; pointer-events: none; }
:root[data-theme="night"] .grain { opacity: .12; }

.night-only { opacity: 0; }
.day-only { opacity: 1; }
:root[data-theme="night"] .night-only { opacity: 1; }
:root[data-theme="night"] .day-only { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .gear-spin { animation: turn 70s linear infinite; transform-origin: 0 0; }
  @keyframes turn { to { transform: rotate(360deg); } }
  .stars circle:nth-child(3n) { animation: twinkle 4s ease-in-out infinite; }
  .stars circle:nth-child(5n) { animation: twinkle 6s ease-in-out infinite 1s; }
  @keyframes twinkle { 50% { opacity: .3; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- lately strip under the hero ---------- */
.lately-strip { border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: .95rem; }
.lately-strip .wrap { display: flex; gap: 1rem; align-items: baseline; padding-top: .9rem; padding-bottom: .9rem; }
.lately-strip .kind { color: var(--muted); flex: none; }
.lately-strip .now { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lately-strip a { flex: none; }

/* ---------- page labels ---------- */
.path { font-family: var(--sans); font-size: .95rem; color: var(--muted); margin: 1.5rem 0 0; }
.lede { font-size: 1.25rem; }
.muted { color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2.8rem 0 .9rem; }
.section-head h2 { margin: 0; }
.section-head a { font-family: var(--sans); font-size: .95rem; }

/* ---------- lately list ---------- */
.lately { list-style: none; padding: 0; margin: 0; }
.lately li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.lately li:last-child { border-bottom: 1px solid var(--line); }
.lately .kind { font-family: var(--sans); font-size: .95rem; color: var(--muted); }

/* ---------- empty states ---------- */
.empty { border: 1px dashed var(--line); border-radius: 6px; padding: 1.2rem 1.3rem; }
.empty p:last-child, .empty ul:last-child { margin-bottom: 0; }
.empty ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------- timeline (work + about) ---------- */
.year-group { margin-top: 2.6rem; }
.year-group > h2 { margin: 0 0 1rem; font-size: 1.05rem; color: var(--muted); font-weight: 500; }
.entry { padding: 0 0 1.6rem 1.2rem; border-left: 2px solid var(--line); position: relative; }
.entry::before {
  content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--marigold);
}
.entry .sub { font-family: var(--sans); color: var(--muted); font-size: 1rem; margin: 0 0 .35rem; }
.tags { font-family: var(--sans); font-size: .9rem; color: var(--green); margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .2rem .7rem; }

.plain { padding-left: 1.2rem; }
.plain li { margin-bottom: .45rem; }

/* ---------- photo grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 1.2rem 0; }
.photo-slot {
  aspect-ratio: 4 / 3; border-radius: 4px; background: var(--line);
  display: flex; align-items: flex-end; padding: .7rem; position: relative; overflow: hidden;
}
.photo-slot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo-slot .r-far { fill: color-mix(in srgb, var(--muted) 25%, var(--line)); }
.photo-slot .r-mid { fill: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.photo-slot span { position: relative; font-family: var(--sans); font-size: .85rem; color: var(--bg); }

.hello { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-footer { margin-top: 4.5rem; padding: 0 0 2.5rem; font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.ridge-line { display: block; width: 100%; height: 2.5rem; overflow: visible; margin-bottom: 1.4rem; }
.ridge-line path { fill: none; stroke: var(--line); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ridge-line .flagpole { stroke: var(--muted); }
.ridge-line .flag { fill: var(--marigold); stroke: none; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer nav[aria-label="Footer"] { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.copy { margin: 1.2rem 0 0; font-size: .85rem; }

/* ---------- social icons ---------- */
.socials { display: flex; gap: .35rem; align-items: center; }
.socials a {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  color: var(--muted); transition: color .2s ease, background-color .2s ease;
}
.socials a:hover { color: var(--ink); background: color-mix(in srgb, var(--muted) 14%, transparent); }
.socials svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.socials .dot { fill: currentColor; stroke-width: 2.2; }
.hello .socials { margin-left: -.5rem; }
.hello .socials svg { width: 1.5rem; height: 1.5rem; }

/* ---------- phones ---------- */
@media (max-width: 700px) {
  body { font-size: 1.05rem; }
  .wrap { padding: 0 1.1rem; }
  .nav { gap: .9rem; }
  .hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .hero-text { order: 1; padding-top: 6.5rem; padding-bottom: .5rem; }
  .art { order: 2; position: relative; height: 24rem; }
  .art img { object-position: 64% 100%; }
  .art::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 5rem; background: linear-gradient(var(--sky1), transparent); z-index: 1; }
  .lately li { grid-template-columns: 1fr; gap: 0; }
  .photo-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .site-header { padding-top: 1rem; padding-bottom: .6rem; }
  .hero-text { padding-top: 7rem; }
}

/* ---------- portrait on About ---------- */
.about-head { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.portrait {
  display: block; width: 11rem; height: 11rem; border-radius: 50%; overflow: hidden; margin-bottom: 1.4rem;
  /* the sky from the home page scene sits behind the cut-out photo */
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky3) 100%);
  transition: background .9s ease;
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 46% 0; }
@media (max-width: 700px) {
  .about-head { grid-template-columns: 1fr; gap: 0; }
  .portrait { order: -1; width: 8rem; height: 8rem; margin: 1.5rem 0 0; }
}

/* ---------- selected LinkedIn / X posts on the blog ---------- */
.embeds { display: grid; gap: 1.2rem; margin-top: 1rem; }
.embed iframe { width: 100%; max-width: 34rem; border: 0; border-radius: 8px; }
.embed .twitter-tweet { margin: 0 !important; }
.lit { transition: opacity .9s ease; }
:root[data-theme="night"] .lit { opacity: .4; }

/* ---------- art collection: credit link and shuffle button ---------- */
.art { transition: opacity .35s ease; }
.art.fading { opacity: 0; }
.art-tools {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; max-width: none;
  display: flex; align-items: center; justify-content: flex-end; gap: .75rem; padding: 1rem 1.25rem;
  pointer-events: none;
}
.art-tools > * { pointer-events: auto; }
.art-credit {
  margin-right: auto; font-family: var(--sans); font-size: .85rem; color: #fff; text-decoration: none;
  background: rgba(10, 14, 20, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: .35rem .75rem; border-radius: 999px;
}
.hero .art-credit { color: #fff; }
.art-credit:hover { background: rgba(10, 14, 20, .6); }
.shuffle {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; padding: 0; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; color: #fff;
  background: rgba(10, 14, 20, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .2s ease, transform .4s ease;
}
.shuffle:hover { background: rgba(10, 14, 20, .58); }
.shuffle:active { transform: rotate(180deg); }
.shuffle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shuffle[hidden], .art-credit[hidden] { display: none; }

/* ---------- the very first illustration: Kalsubai with a gear-shaped sun ---------- */
.first-art { margin: .5rem 0 2rem; }
.first-art svg { display: block; width: 100%; height: auto; border-radius: 6px; }
.first-art figcaption { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.first-art svg * { transition: fill .6s ease, stop-color .6s ease; }
.fa-sky-top { stop-color: #dfe7e3; } .fa-sky-bottom { stop-color: #f3efe0; }
.fa-far { fill: #b9c7bd; } .fa-mid { fill: #7f9a87; } .fa-near { fill: #3f5f4b; }
.fa-gear { fill: var(--marigold); transform-origin: 0 0; }
.fa-stars circle { fill: transparent; }
.fa-trekker { fill: var(--ink); } .fa-flag { fill: var(--marigold); }
:root[data-theme="night"] .fa-sky-top { stop-color: #0f1513; }
:root[data-theme="night"] .fa-sky-bottom { stop-color: #1f2a25; }
:root[data-theme="night"] .fa-far { fill: #2b3a33; }
:root[data-theme="night"] .fa-mid { fill: #22302a; }
:root[data-theme="night"] .fa-near { fill: #121a16; }
:root[data-theme="night"] .fa-stars circle { fill: var(--ink); }
:root[data-theme="night"] .fa-trekker { fill: var(--muted); }
.first-intro h1 { margin-top: 0; }

/* ---------- the full-width Kalsubai scene (the one Kalpesh chose) ---------- */
:root {
  --s-top: #8dbdd8; --s-horizon: #f5dcae;
  --r-far: #9db8b6; --r-mid: #6e917b; --r-near: #3f6450; --ledge: #22362b;
  --mist: rgba(255, 255, 255, .35); --cloud: rgba(255, 255, 255, .85);
  --shrine: #f1ece0; --trail: rgba(255, 246, 225, .8); --figure: #142019; --tent: #b5642a;
}
:root[data-theme="night"] {
  --s-top: #07101f; --s-horizon: #263a5c;
  --r-far: #22324a; --r-mid: #18263a; --r-near: #111c2a; --ledge: #090f17;
  --mist: rgba(140, 165, 200, .18); --cloud: transparent;
  --shrine: #2a3346; --trail: rgba(200, 210, 230, .18); --figure: #04080d; --tent: #2c2a33;
}
.hero { background: var(--s-top); }
.scene .s-top { stop-color: var(--s-top); }
.scene .s-horizon { stop-color: var(--s-horizon); }
.scene .r-far { fill: var(--r-far); }
.scene .r-mid { fill: var(--r-mid); }
.scene .r-near { fill: var(--r-near); }
.scene .ledge { fill: var(--ledge); }
.scene .mist { fill: var(--mist); }
.scene .cloud ellipse { fill: var(--cloud); }
.scene .birds { stroke: var(--figure); }
.scene .shrine, .scene .houses { fill: var(--shrine); }
.scene .flag { fill: var(--marigold); }
.scene .trail { stroke: var(--trail); }
.scene .tent { fill: var(--tent); }
.scene .trekker { fill: var(--figure); }
.scene .gear { fill: var(--marigold); }
.scene .moon { fill: #f3ecd2; }
.scene .stars circle { fill: #f5f2e6; }
.scene .lights circle:not([fill]) { fill: #ffd27a; }
.scene .tent-light { fill: #ffc861; }
@media (max-width: 700px) {
  .scene { order: 2; position: relative; height: 26rem; }
}
.scene .lights circle[fill] { fill: url(#glow); }

/* ---------- blog: post list and post pages ---------- */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-item { padding: 1rem 0; border-top: 1px solid var(--line); }
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-title { font-family: var(--sans); font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.post-title:hover { text-decoration: underline; text-decoration-color: var(--marigold); }
.post-meta { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: .2rem 0 .3rem; }
.post-meta .ptags { color: var(--green); margin-left: .4rem; }
.post-meta .ptags span { margin-right: .5rem; }
.post-desc { margin: 0; }
.post h1 { margin-bottom: .2em; }
.post-cover { width: 100%; border-radius: 6px; margin: 1rem 0 1.5rem; display: block; }
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
.prose h2 { margin-top: 2.2rem; }
.prose blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 3px solid var(--marigold); color: var(--muted); }
.prose pre, .prose code { font-size: .9em; background: color-mix(in srgb, var(--muted) 12%, transparent); border-radius: 4px; }
.prose pre { padding: .8rem 1rem; overflow-x: auto; }
.post-end { margin-top: 3rem; font-family: var(--sans); }

/* ---------- photos page: real photos ---------- */
.photo-wall { columns: 2 16rem; column-gap: .9rem; margin: 1.4rem 0; }
.photo { break-inside: avoid; margin: 0 0 .9rem; }
.photo img { width: 100%; height: auto; display: block; border-radius: 4px; }
.photo figcaption { font-family: var(--sans); font-size: .85rem; margin-top: .35rem; }

/* ---------- phones: show the whole sky and let the scene fade into the page ---------- */
@media (max-width: 700px) {
  .hero .scene {
    height: auto; aspect-ratio: 650 / 800;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%);
  }
}

/* ---------- top bar: two-line menu button on phones (like rajrajhans.com) ---------- */
.header-right { display: flex; align-items: center; gap: 1.2rem; }
.menu-btn {
  display: none; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; margin-left: -.45rem;
  background: none; border: 0; border-radius: 50%; color: var(--ink); cursor: pointer;
}
.home .menu-btn { color: var(--hero-ink); }
.menu-btn svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; overflow: visible; }
.menu-btn path { transition: transform .3s ease; transform-origin: 12px 12px; }
.menu-open .menu-btn .l1 { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-btn .l2 { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-start;
  padding: 6.5rem 1.6rem 2rem; background: var(--bg);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; transition-delay: calc(var(--i) * 50ms); }
.mobile-menu a {
  display: block; padding: .35rem 0; font-family: var(--sans); font-size: 1.2rem; font-weight: 500;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.mobile-menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--marigold); text-decoration-thickness: 3px; text-underline-offset: .3em; }
.menu-open { overflow: hidden; }
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open .mobile-menu li { opacity: 1; transform: none; }
.menu-open .topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; }
.menu-open .home .menu-btn, .menu-open .menu-btn,
.menu-open .brand, .menu-open .brand .first, .menu-open .theme-toggle { color: var(--ink); }
.menu-open .brand .last { color: var(--muted); opacity: 1; }

@media (max-width: 700px) {
  .site-header { display: grid; grid-template-columns: auto 1fr auto; align-items: center; flex-wrap: nowrap; }
  .menu-btn { display: inline-grid; }
  .brand { justify-self: center; }
  .header-right .nav { display: none; }
}
@media (min-width: 701px) {
  .mobile-menu { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu li, .menu-btn path { transition: none; }
}
.mobile-menu:focus { outline: none; }

/* ---------- footer: centred, links without underlines ---------- */
.foot-row { flex-direction: column; justify-content: center; align-items: center; gap: .9rem; text-align: center; }
.site-footer nav[aria-label="Footer"] { justify-content: center; gap: .4rem 1.4rem; }
.site-footer nav[aria-label="Footer"] a { text-decoration: none; }
.site-footer nav[aria-label="Footer"] a:hover { color: var(--ink); }
.site-footer .socials { justify-content: center; }
.copy { text-align: center; }
