/* vontrix.dev — one quiet column, plus desi mode (day and night). */

:root {
  --bg: #fafaf7;
  --ink: #151515;
  --muted: #6c6c67;
  --faint: #a2a29c;
  --line: #e6e5df;
  --hl: #f0efe9;
  --seal: #d0412a;
  --live: #2f9e68;
  --shu: #c8341c;    /* sindoor */
  --haldi: #dfa21f;  /* turmeric */
  --neel: #263b7a;   /* indigo */
  --paper: #f8eedb;
  --easy: #1f9e8f;
  --medium: #d08a12;
  --hard: #d0412a;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: var(--sans);
  --deva: "Yatra One", "Rozha One", serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --grain: none;
  color-scheme: light;
}

:root[data-mode="dark"]:not([data-theme]) {
  --bg: #101010;
  --ink: #ecebe7;
  --muted: #8e8e88;
  --faint: #5d5d58;
  --line: #262624;
  --hl: #1b1b1a;
  --seal: #ff6a4b;
  --live: #3dd68c;
  --easy: #3cc7b4;
  --medium: #f0a52a;
  --hard: #ff6a4b;
  color-scheme: dark;
}

/* desi — khadi paper by day */
:root[data-theme="desi"] {
  --bg: #f2e7d0;
  --ink: #22180f;
  --muted: #6e5a43;
  --faint: #a48d6e;
  --line: #dccaa6;
  --hl: #e8d9b8;
  --seal: var(--shu);
  --live: #3f7d4f;
  --sans: "Martel", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --display: "Rozha One", Georgia, serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .3 0 0 0 0 .16 0 0 0 .24 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

/* desi — a Diwali-ish night with the lights off */
:root[data-mode="dark"][data-theme="desi"] {
  --bg: #17141c;
  --ink: #f1e5c9;
  --muted: #b3a283;
  --faint: #7a6c56;
  --line: #342c34;
  --hl: #241e27;
  --shu: #e9573a;
  --haldi: #f2b73a;
  --neel: #5b74c4;
  --live: #5fd08e;
  --easy: #3cc7b4;
  --medium: #f2b73a;
  --hard: #ff7a5c;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .75 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: var(--grain);
  color: var(--ink);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[data-theme="desi"] body { font-size: 15.5px; line-height: 1.75; }
::selection { background: var(--ink); color: var(--bg); }
[data-theme="desi"] ::selection { background: var(--shu); color: var(--paper); }

/* scrollbars */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border: 3px solid var(--bg); border-radius: 12px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
[data-theme="desi"] ::-webkit-scrollbar-track { background: var(--bg) var(--grain); border-left: 1px solid var(--line); }
[data-theme="desi"] ::-webkit-scrollbar-thumb { background: linear-gradient(var(--haldi), var(--shu)); }
@supports (-moz-appearance: none) {
  html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  [data-theme="desi"] { scrollbar-color: var(--shu) transparent; }
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s;
}
a:hover { text-decoration-color: currentColor; }
[data-theme="desi"] a:hover { text-decoration-color: var(--shu); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.page {
  max-width: 37rem;
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 7rem) 1.25rem 3rem;
}
.page > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.page > :nth-child(2) { animation-delay: .06s; }
.page > :nth-child(3) { animation-delay: .12s; }
.page > :nth-child(4) { animation-delay: .18s; }
.page > :nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- intro ---------- */

.intro { position: relative; }
.intro p { margin: 0 0 1rem; }
.name {
  margin: 0 0 .75rem;
  font: 600 1.3rem/1.2 var(--display);
  letter-spacing: -.015em;
}
.name rt {
  font: 400 .55em/1.5 var(--deva);
  letter-spacing: .08em;
  color: var(--faint);
  opacity: 0;
  transition: opacity .35s, letter-spacing .35s;
}
.name:hover rt { opacity: 1; letter-spacing: .14em; }
[data-theme="desi"] .name {
  font-size: clamp(2.5rem, 8.5vw, 3.4rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
[data-theme="desi"] .name rt { opacity: 1; color: var(--shu); font-size: .36em; letter-spacing: .12em; }

/* plain mode: a big name with a highlighter swipe, mono caps, red underlines and a faint grid */
.kicker { margin: 0 0 1.25rem !important; font: 500 .74rem/1.5 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
:root:not([data-theme]) .name {
  margin-bottom: .6rem;
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
}
:root:not([data-theme]) .name ruby {
  padding: 0 .06em;
  background: linear-gradient(color-mix(in srgb, var(--seal) 26%, transparent), color-mix(in srgb, var(--seal) 26%, transparent)) no-repeat 0 88% / 0 .32em;
  animation: swipe .7s .5s cubic-bezier(.6, 0, .2, 1) forwards;
  transition: background-size .3s;
}
:root:not([data-theme]) .name:hover ruby { background-size: 100% .9em; }
:root:not([data-theme]) .name rt { font-size: .26em; letter-spacing: .1em; }
@keyframes swipe { to { background-size: 100% .32em; } }
:root:not([data-theme]) a { text-decoration-color: color-mix(in srgb, var(--seal) 65%, transparent); text-decoration-thickness: 1.5px; }
:root:not([data-theme]) a:hover { text-decoration-color: var(--ink); }
:root:not([data-theme]) .links a { font: 500 .78rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .2s; }
:root:not([data-theme]) .links a:hover { color: var(--seal); }
:root:not([data-theme]) body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 100% 100%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 100% 100%, #000, transparent 75%);
  opacity: .8;
}

.w { position: relative; cursor: default; border-bottom: 1px dashed var(--faint); }
.w[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: .35rem .55rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font: 500 .7rem/1 var(--mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.w[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }
.wave span { display: inline-block; }
.wave:hover span { animation: wave .55s ease calc(var(--i) * 45ms); }
@keyframes wave { 40% { transform: translateY(-.32em) rotate(-4deg); } }

.links { display: flex; flex-wrap: wrap; gap: .2rem .85rem; margin-top: 1.25rem; }
.links a:not(:last-child)::after {
  content: "·";
  display: inline-block;
  margin-left: .85rem;
  color: var(--faint);
}
[data-theme="desi"] .links a:not(:last-child)::after { content: "।"; color: var(--shu); font-family: var(--deva); }

/* the sun by day, the moon at night — desi mode only */
.sun {
  display: none;
  position: absolute;
  top: -2.25rem;
  right: 0;
  width: 124px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(#f6c74f, #ee8a2a 55%, var(--shu));
  pointer-events: none;
  z-index: -1;
}
.sun::after {
  content: "";
  position: absolute;
  inset: 48% 0 0;
  background: repeating-linear-gradient(to bottom, transparent 0 8px, var(--bg) 8px 12px);
}
[data-theme="desi"] .sun { display: block; }
[data-mode="dark"][data-theme="desi"] .sun {
  background: radial-gradient(circle at 36% 34%, #fffaf0, #f6e4b8 55%, #dcc08a);
  box-shadow: 0 0 60px rgba(255, 226, 160, .28), 0 0 140px rgba(255, 200, 120, .12);
}
[data-mode="dark"][data-theme="desi"] .sun::after { background: repeating-linear-gradient(to bottom, transparent 0 9px, var(--bg) 9px 12px); }
[data-mode="dark"][data-theme="desi"] body::before { /* stars */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1.2px 1.2px at 20% 30%, #fff6dd 50%, transparent 100%) 0 0 / 173px 211px,
    radial-gradient(1px 1px at 70% 60%, #fff6dd 50%, transparent 100%) 0 0 / 251px 163px,
    radial-gradient(1.6px 1.6px at 40% 80%, #ffe2a8 50%, transparent 100%) 0 0 / 331px 277px;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .9; } }

/* name in Devanagari down the margin, desi mode on wide screens */
.tate {
  display: none;
  position: fixed;
  top: 50%;
  left: clamp(1.25rem, 5vw, 4rem);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--deva);
  pointer-events: none;
}
.tate span:first-child { font-size: 1.6rem; letter-spacing: .18em; color: var(--shu); }
.tate span:last-child { font-size: .85rem; letter-spacing: .3em; color: var(--faint); margin-right: .8rem; }
@media (min-width: 1040px) { [data-theme="desi"] .tate { display: block; } }

/* ---------- sections ---------- */

.sec { margin-top: 3.25rem; }
.label {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 1rem;
  font: 500 .78rem/1.2 var(--mono);
  letter-spacing: .02em;
  color: var(--muted);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
[data-theme="desi"] .label { font: 700 .95rem/1.2 var(--sans); color: var(--ink); }
[data-theme="desi"] .label::before {
  content: attr(data-hi);
  padding: .38rem .55rem .22rem;
  border-radius: 3px;
  background: var(--shu);
  color: var(--paper);
  font: 400 1rem/1 var(--deva);
  letter-spacing: .03em;
  box-shadow: 2px 2px 0 var(--haldi);
}
[data-theme="desi"] .label::after {
  height: 6px;
  background: radial-gradient(circle, var(--faint) 1.2px, transparent 1.6px) 0 50% / 9px 6px repeat-x;
}

.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.plain li { position: relative; padding-left: 1.15rem; }
.plain li::before { content: "–"; position: absolute; left: 0; color: var(--faint); }
[data-theme="desi"] .plain li::before { content: "✿"; left: -.1rem; color: var(--shu); font-size: .8em; font-family: serif; }

/* projects */
.proj { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.proj > li { counter-increment: p; }
.proj summary {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: baseline;
  gap: .5rem;
  padding: .42rem 0;
  cursor: pointer;
  list-style: none;
}
.proj summary::-webkit-details-marker { display: none; }
.proj summary::before { content: counter(p, decimal-leading-zero); font: 400 .74rem/1 var(--mono); color: var(--faint); transition: color .2s; }
.proj .td b { font-weight: 500; }
.proj .td span { color: var(--muted); }
.proj summary:hover b { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.proj details[open] summary::before { color: var(--ink); }
.m { font: 400 .74rem/1 var(--mono); color: var(--faint); white-space: nowrap; }
.more { padding: 0 0 .9rem 2.5rem; color: var(--muted); font-size: .95rem; }
.more p { margin: .15rem 0 .5rem; }
.proj details[open] .more { animation: rise .35s ease both; }
.stack { font: 400 .76rem/1.6 var(--mono); color: var(--faint); }
.stack a { color: var(--muted); }
[data-theme="desi"] .proj summary::before { content: counter(p, devanagari); font: 400 1.05rem/1 var(--deva); color: var(--shu); }
[data-theme="desi"] .proj .td b { font-weight: 800; }

/* experience */
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rows li { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: .75rem; align-items: baseline; }
.rows .t { font-weight: 500; }
.rows .d { color: var(--muted); }
[data-theme="desi"] .rows .t { font-weight: 800; }

/* writing */
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.posts li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.posts time { font: 400 .74rem/1 var(--mono); color: var(--faint); white-space: nowrap; }
.posts .empty { display: block; color: var(--muted); }

/* right now */
.live { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .95rem; }
.live li { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.live li[hidden] { display: none; }
.live .v { color: var(--muted); min-width: 0; }
.live .v a { color: var(--ink); }
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.dot.on { background: var(--live); animation: ping 2.4s infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; margin-right: .4rem; }
.eq i { width: 2px; height: 100%; background: var(--live); transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; }
.eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.live .covers { padding-left: calc(7px + .7rem); margin-top: -.15rem; gap: .4rem; }
.covers a { display: block; flex: none; line-height: 0; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.covers a:hover { transform: translateY(-3px) rotate(-3deg) scale(1.15); }
.covers img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; background: var(--hl); }
[data-theme="desi"] .covers img { border-radius: 2px; filter: sepia(.3) saturate(1.1); box-shadow: 0 0 0 2px var(--paper), 0 1px 4px rgba(0, 0, 0, .25); }

.diff { font: 500 .74rem/1 var(--mono); }
.diff.easy { color: var(--easy); }
.diff.medium { color: var(--medium); }
.diff.hard { color: var(--hard); }

.spark { flex: none; display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.spark small { font: 400 .7rem/1 var(--mono); color: var(--faint); white-space: nowrap; }
#spark { overflow: visible; }
#spark rect { fill: var(--faint); transition: fill .15s; }
#spark rect:hover { fill: var(--ink); }
[data-theme="desi"] #spark rect { fill: var(--neel); opacity: .75; }
[data-theme="desi"] #spark rect:hover { fill: var(--shu); opacity: 1; }

/* footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .4rem 1rem;
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font: 400 .74rem/1.6 var(--mono);
  color: var(--faint);
}
.foot a { color: var(--muted); }

/* saree border along the bottom — desi mode only */
.border {
  display: none;
  height: 46px;
  background:
    radial-gradient(circle, var(--neel) 0 2px, transparent 2.5px) left 9px top 4px / 18px 10px repeat-x,
    radial-gradient(circle, var(--haldi) 0 2.2px, transparent 2.7px) left 9px bottom 0 / 18px 16px repeat-x,
    linear-gradient(45deg, var(--shu) 25%, transparent 25%) left 0 bottom 16px / 18px 18px repeat-x,
    linear-gradient(-45deg, var(--shu) 25%, transparent 25%) left 0 bottom 16px / 18px 18px repeat-x,
    linear-gradient(var(--shu), var(--shu)) left 0 bottom 0 / 100% 16px no-repeat;
}
[data-theme="desi"] .border { display: block; }

/* ---------- the seal button and the haveli doors ---------- */

.seal {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1.5px solid var(--seal);
  border-radius: 7px;
  background: var(--bg);
  color: var(--seal);
  font: 400 1.25rem/1 var(--deva);
  cursor: pointer;
  transform: rotate(-6deg);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), background-color .2s, color .2s;
}
.seal span { display: block; transform: translateY(.12em); }
.seal:hover { transform: rotate(0) scale(1.08); background: var(--seal); color: var(--bg); }
[data-theme="desi"] .seal { background: var(--shu); color: var(--paper); border-color: var(--shu); font: 400 1.15rem/1 "Rozha One", serif; box-shadow: 2px 2px 0 var(--haldi); }
[data-theme="desi"] .seal span { transform: none; }
.seal.nudge { animation: nudge .8s 2; }
@keyframes nudge {
  25% { transform: rotate(10deg) scale(1.12); }
  50% { transform: rotate(-14deg); }
  75% { transform: rotate(4deg); }
}

/* lights: a sun that becomes a moon; the new theme is revealed in a circle from the button */
.lamp {
  position: fixed;
  top: 1rem;
  right: 3.9rem;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), border-color .2s;
}
.lamp:hover { transform: rotate(-24deg) scale(1.08); border-color: var(--ink); }
.lamp svg { width: 1.2rem; height: 1.2rem; overflow: visible; }
.lamp :is(.orb, .rays) { transform-box: fill-box; transform-origin: center; }
.lamp .orb { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.lamp .bite { transition: transform .5s cubic-bezier(.3, 1.2, .5, 1); }
.lamp .rays { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; }
[data-mode="dark"] .lamp .orb { transform: scale(1.6); }
[data-mode="dark"] .lamp .bite { transform: translate(-6px, 6px); }
[data-mode="dark"] .lamp .rays { transform: rotate(90deg) scale(.4); opacity: 0; }
[data-theme="desi"] .lamp { background: var(--paper); border-color: var(--ink); box-shadow: 2px 2px 0 var(--haldi); }
[data-mode="dark"][data-theme="desi"] .lamp { background: var(--bg); color: var(--haldi); border-color: var(--haldi); box-shadow: 0 0 14px rgba(242, 183, 58, .35); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* a scribbled "click here" pointing at the seal, plain mode only */
.cta {
  position: fixed;
  top: 3.4rem;
  right: 1.5rem;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  background: none;
  color: var(--seal);
  font: 500 1.4rem/1 var(--hand);
  cursor: pointer;
  transform: rotate(-4deg);
  animation: cta-in .5s 1s both, bob 2.8s 1.5s ease-in-out infinite;
}
.cta span { margin-bottom: -.15rem; text-shadow: 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 8px var(--bg), 0 0 8px var(--bg); transition: transform .2s; }
.cta:hover span { transform: scale(1.08) rotate(-3deg); }
.cta svg { width: 2.5rem; height: 2.75rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2px var(--bg)) drop-shadow(0 0 3px var(--bg)); }
.cta path { stroke-dasharray: 80; animation: scribble .7s 1.2s both; }
[data-theme="desi"] .cta { display: none; }
@keyframes cta-in { from { opacity: 0; } }
@keyframes bob { 50% { transform: rotate(-4deg) translate(-2px, -3px); } }
@keyframes scribble { from { stroke-dashoffset: 80; } }

.doors { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
.doors.closing, .doors.opening { pointer-events: auto; visibility: visible; }
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 50.2%;
  background-color: #6d3f1d;
  background-image:
    radial-gradient(circle, #f3d27a 0 3.5px, #a27a2c 4px 5.5px, transparent 6px),
    linear-gradient(90deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px),
    linear-gradient(rgba(255, 210, 140, .08), rgba(0, 0, 0, .18)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .35' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .1 0 0 0 0 .03 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E");
  background-size: 25% 84px, 12.5% 100%, 100% 100%, 300px 300px;
  background-position: center 42px, 0 0, 0 0, 0 0;
  box-shadow: inset 0 0 0 16px #3e200c, inset 0 0 0 19px #c99a3c, inset 0 0 0 26px #4a2710, 0 0 60px rgba(0, 0, 0, .35);
  transform: translateX(-102%);
}
.door.r { left: auto; right: 0; transform: translateX(102%); }
.door::after { /* brass knocker ring */
  content: "";
  position: absolute;
  top: 50%;
  right: 30px;
  width: 38px;
  height: 38px;
  margin-top: 96px;
  border: 5px solid #d9ae4f;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #8a6421, 0 2px 4px rgba(0, 0, 0, .5);
}
.door.r::after { right: auto; left: 30px; }
.closing .door { transform: none; transition: transform .56s cubic-bezier(.75, 0, .25, 1); }
.opening .door { transition: transform .78s cubic-bezier(.6, 0, .2, 1); }
.stamped .door { animation: thud .28s ease; }
@keyframes thud { 30% { transform: translateY(4px); } 65% { transform: translateY(-1px); } }

.stamp { /* लाख की मुहर — a red lac seal over the seam */
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 47% 53% 45% 55% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 38% 32%, #e0533a, #b0261a 55%, #7d140d);
  color: #8e1a11;
  font: 400 62px/1 var(--deva);
  text-shadow: -1px -1px 0 rgba(255, 170, 140, .45), 1px 2px 1px rgba(60, 0, 0, .6);
  box-shadow: inset 0 0 0 12px rgba(0, 0, 0, .06), inset 3px 4px 8px rgba(255, 150, 120, .4), inset -4px -6px 10px rgba(60, 0, 0, .5), 0 8px 24px rgba(40, 5, 0, .45);
  opacity: 0;
  transform: scale(2.3) rotate(-16deg);
}
.stamp::before { /* the embossed ring */
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  box-shadow: inset 1px 2px 2px rgba(60, 0, 0, .55), 0 -1px 1px rgba(255, 170, 140, .35);
}
.stamp span { transform: translateY(.1em); }
.stamped .stamp { opacity: 1; transform: scale(1) rotate(-8deg); transition: transform .17s cubic-bezier(.3, 1.5, .5, 1), opacity .1s; }
.opening .stamp { opacity: 0; transform: scale(1) rotate(-8deg); transition: opacity .25s; }

.petals { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; pointer-events: none; }

/* ---------- writing pages ---------- */

.sub { margin-bottom: 3rem; font: 400 .8rem/1 var(--mono); }
.sub a { color: var(--muted); text-decoration: none; }
.sub a:hover { color: var(--ink); }
.title { margin: 0 0 .4rem; font: 600 1.65rem/1.25 var(--display); letter-spacing: -.02em; }
[data-theme="desi"] .title { font-size: 2.2rem; font-weight: 400; letter-spacing: 0; }
.meta { margin: 0 0 2.5rem; font: 400 .76rem/1.4 var(--mono); color: var(--faint); }
.prose h2 { margin: 2.4rem 0 .6rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.prose h3, .prose h4 { margin: 2rem 0 .5rem; font-size: 1rem; font-weight: 600; }
[data-theme="desi"] .prose :is(h2, h3, h4) { font-weight: 800; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre { margin: 0 0 1.15rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .3rem; }
.prose pre { padding: 1rem 1.1rem; overflow-x: auto; border-radius: 8px; background: var(--hl); font: 400 .82rem/1.6 var(--mono); }
.prose :not(pre) > code { padding: .12em .36em; border-radius: 4px; background: var(--hl); font: 400 .86em var(--mono); }
.prose blockquote { padding-left: 1rem; border-left: 2px solid var(--line); color: var(--muted); }
[data-theme="desi"] .prose blockquote { border-left-color: var(--shu); }
.prose img { max-width: 100%; height: auto; border-radius: 6px; }
.prose hr { margin: 2.2rem 0; border: 0; border-top: 1px solid var(--line); }

/* ---------- small screens, reduced motion ---------- */

@media (max-width: 560px) {
  .rows li { grid-template-columns: 1fr auto; }
  .rows .d { grid-column: 1 / -1; order: 3; margin-top: -.6rem; }
  .proj summary { grid-template-columns: 1.6rem 1fr auto; }
  .proj .td span { display: block; font-size: .9rem; }
  .more { padding-left: 2.1rem; }
  .live li { flex-wrap: wrap; }
  .spark { display: none; }
  .sun { top: -4.6rem; right: 3.4rem; width: 68px; }
  .sun::after { background: repeating-linear-gradient(to bottom, transparent 0 5px, var(--bg) 5px 8px) !important; }
  .door::after { right: 14px; }
  .door.r::after { left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
