/* Keshav Jha. Apple-style: system font (SF Pro on Apple, Segoe UI Variable on Windows), light and dark. */
:root {
  --bg: #ffffff; --alt: #f5f5f7; --card: #ffffff; --text: #1d1d1f; --muted: #6e6e73;
  --line: #d2d2d7; --link: #0066cc; --btn: #0071e3; --btn-h: #0062c4; --green: #18773f;
  --nav: rgba(255, 255, 255, .72);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000; --alt: #101010; --card: #1d1d1f; --text: #f5f5f7; --muted: #a1a1a6;
  --line: #424245; --link: #2997ff; --btn: #0071e3; --btn-h: #0077ed; --green: #30d158;
  --nav: rgba(22, 22, 23, .8);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.47 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; transition: background-color .4s, color .4s; overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { width: 16px; height: 16px; flex: none; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.muted { color: var(--muted); }
.center { text-align: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 1px; }

/* Global nav */
.gnav { position: sticky; top: 0; z-index: 50; background: var(--nav); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.gnav-in { max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gnav-logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-badge { width: 34px; height: 34px; border-radius: 10px; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform .3s var(--ease); }
.gnav-logo:hover .logo-badge { transform: rotate(-8deg) scale(1.05); }
.logo-badge svg { width: 17px; height: 17px; }
.logo-txt { display: grid; font-size: 16px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.logo-txt small { font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.gnav-links { display: flex; gap: 6px; }
.gnav-links a { font-size: 14px; font-weight: 500; color: var(--text); opacity: .8; padding: 8px 12px; border-radius: 980px; transition: opacity .2s, background-color .2s; }
.gnav-links a:hover { opacity: 1; background: color-mix(in srgb, var(--text) 7%, transparent); }
.gnav-links a.on { opacity: 1; background: color-mix(in srgb, var(--text) 9%, transparent); }
.nav-cv { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 980px; background: var(--btn); color: #fff; font-size: 14px; font-weight: 600; transition: background-color .2s, transform .1s; }
.nav-cv:hover { background: var(--btn-h); }
.nav-cv:active { transform: scale(.96); }
.nav-cv svg { width: 15px; height: 15px; }
.gnav-right { display: flex; align-items: center; gap: 8px; }
.theme, .menu { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 50%; transition: background-color .2s, transform .1s; }
.theme:hover, .menu:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.theme:active { transform: scale(.92); }
.theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: none; }
:root[data-theme="dark"] .theme .moon { display: block; }
.menu { display: none; gap: 5px; align-content: center; }
.menu span:not(.sr) { display: block; width: 16px; height: 1.5px; background: currentColor; border-radius: 1px; transition: transform .3s var(--ease); }
.menu[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* Buttons and links */
.cta { display: flex; justify-content: center; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.cta.left { justify-content: flex-start; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 980px; background: var(--btn); color: #fff; font-size: 17px; transition: background-color .2s, transform .1s; }
.btn:hover { background: var(--btn-h); }
.btn:active { transform: scale(.97); }
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--link); font-size: 17px; }
.link svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.link:hover { text-decoration: underline; }
.link:hover svg { transform: translateX(2px); }
.link.inline { font-size: inherit; }
.links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }

/* Hero */
.hero { text-align: center; padding: 72px 22px 40px; }
.eyebrow { font-size: 21px; font-weight: 600; color: var(--muted); }
.hero h1 { font-size: clamp(56px, 10vw, 112px); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin-top: 6px; }
.hero-sub { font-size: clamp(24px, 3.2vw, 34px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 10px; }
.hero-copy { max-width: 640px; margin: 18px auto 0; font-size: 19px; color: var(--muted); line-height: 1.5; }
.hero-media { max-width: 1100px; margin: 56px auto 0; border-radius: 28px; overflow: hidden; }
.hero-media img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: center 40%; transform-origin: center; }
.hero-note { margin-top: 22px; font-size: 14px; color: var(--muted); }

/* Sections */
.section { padding: 110px 22px; }
.alt { background: var(--alt); transition: background-color .4s; }
.wrap { max-width: 1024px; margin: 0 auto; }
.wrap.narrow { max-width: 760px; }
.sec-title { font-size: clamp(36px, 5.4vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.07; margin-bottom: 56px; }
.sec-title .muted { font-weight: 700; }
.sub-title { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 64px 0 22px; }
.tile-k { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.meta { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* Highlights */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { background: var(--card); border-radius: 22px; padding: 28px 24px; }
.stat-n { font-size: clamp(40px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 12px; }
.stat-n small { font-size: 20px; margin-left: 4px; color: var(--muted); }
.stat p:last-child { font-size: 15px; color: var(--muted); }
.places { text-align: center; margin-top: 44px; font-size: 15px; color: var(--muted); }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { background: var(--alt); border-radius: 28px; overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease); }
.tile:hover { transform: scale(1.01); }
.tile-txt { padding: 30px 30px 26px; }
.tile h3 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 10px; }
.tile p:not(.tile-k) { font-size: 16px; color: var(--muted); }
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin-top: auto; }
.tile--wide { grid-column: span 2; grid-row: span 2; }
.tile--wide h3 { font-size: 32px; }
.tile--wide img { aspect-ratio: auto; flex: 1 1 0; min-height: 280px; height: 100%; }
.bento .tile:last-child { grid-column: span 2; }
.sec-title.tight { margin-bottom: 16px; }
.lead { font-size: clamp(19px, 2vw, 24px); color: var(--muted); max-width: 46ch; margin-bottom: 48px; line-height: 1.4; }

/* Work cards */
.cards { display: grid; gap: 20px; }
.card { background: var(--card); border-radius: 28px; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, .08); }
.card--big { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; }
.card--big .card-txt { padding: 44px; }
.card-txt { padding: 26px 28px 30px; }
.card h3 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 10px; }
.card--big h3 { font-size: 34px; }
.card h4 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 8px; }
.card-txt > p:not(.tile-k):not(.meta):not(.links) { color: var(--muted); font-size: 16px; }
.card-img { display: block; padding: 28px 28px 28px 0; }
.card-img img { width: 100%; border-radius: 14px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); transition: transform .6s var(--ease); }
.card-img:hover img { transform: scale(1.02); }
.card-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.small .card-photo { aspect-ratio: 4 / 3; }
.small .card-txt > p:not(.meta):not(.links) { font-size: 15px; }

.feature { position: relative; margin-top: 44px; border-radius: 28px; overflow: hidden; color: #f5f5f7; min-height: 560px; display: flex; align-items: flex-end; }
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feature:hover img { transform: scale(1.03); }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 45%, transparent 75%); }
.feature-txt { position: relative; z-index: 1; padding: 48px; max-width: 760px; }
.feature .tile-k { color: #c7c7cc; }
.feature h3 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin-bottom: 14px; }
.feature p:not(.tile-k) { font-size: 18px; color: #e5e5ea; }

/* About */
.statement { font-size: clamp(24px, 3vw, 32px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 28px; }
.body-l { font-size: 19px; color: var(--muted); margin-bottom: 18px; line-height: 1.55; }

/* Experience */
.acc details { border-bottom: 1px solid var(--line); }
.acc details:first-child { border-top: 1px solid var(--line); }
.acc summary { list-style: none; display: grid; grid-template-columns: 1fr auto 20px; gap: 18px; align-items: center; padding: 22px 2px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary span { display: grid; gap: 3px; }
.acc summary b { font-size: 19px; font-weight: 600; }
.acc summary i { font-style: normal; font-size: 15px; color: var(--muted); }
.acc summary em { font-style: normal; font-size: 15px; color: var(--muted); white-space: nowrap; }
.acc summary > svg { color: var(--muted); transition: transform .35s var(--ease); }
.acc details[open] summary > svg { transform: rotate(45deg); color: var(--text); }
.acc ul { padding: 0 40px 22px 2px; display: grid; gap: 8px; list-style: disc; padding-left: 20px; }
.acc li { color: var(--muted); font-size: 16px; }

/* Specs */
.specs { margin: 0; }
.specs div { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.specs div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { font-size: 17px; font-weight: 600; }
.specs dd { margin: 0; font-size: 17px; }

/* Ventures and repos */
.ventures, .repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.venture, .repo { background: var(--card); border-radius: 22px; padding: 26px; transition: transform .4s var(--ease); }
.venture:hover, .repo:hover { transform: translateY(-3px); }
.venture h3, .repo h3 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 6px 0 8px; }
.venture p:last-child, .repo p { font-size: 15px; color: var(--muted); }
.status { font-size: 13px; font-weight: 600; color: var(--muted); }
.status.live { color: var(--green); }
.repo { background: var(--alt); display: flex; flex-direction: column; }
.repo > svg { width: 22px; height: 22px; color: var(--muted); }
.lang { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.lang i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lang .py { background: #3572a5; } .lang .js { background: #e8d44d; } .lang .html { background: #e34c26; }

/* Contact */
.contact .eyebrow { font-size: 17px; }
.big { font-size: clamp(44px, 7.5vw, 80px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; margin-top: 10px; }
.email { display: inline-block; margin-top: 36px; font-size: clamp(22px, 3vw, 32px); font-weight: 600; letter-spacing: -.02em; color: var(--link); overflow-wrap: anywhere; }
.email:hover { text-decoration: underline; }

/* Footer */
.foot { background: var(--alt); padding: 64px 24px 32px; color: var(--muted); border-top: 1px solid var(--line); transition: background-color .4s; }
.foot .wrap { max-width: 1120px; }
.foot-top { display: grid; grid-template-columns: 1.1fr 2fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.foot-brand { display: grid; gap: 18px; align-content: start; }
.foot-brand p { font-size: 15px; max-width: 34ch; }
.gnav-logo.big .logo-badge { width: 42px; height: 42px; border-radius: 12px; }
.gnav-logo.big .logo-txt { font-size: 19px; color: var(--text); }
.socials { display: flex; gap: 10px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--text); border: 1px solid var(--line); transition: transform .25s var(--ease), background-color .2s, color .2s; }
.socials a:hover { transform: translateY(-3px); background: var(--btn); color: #fff; border-color: var(--btn); }
.socials svg { width: 18px; height: 18px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.foot-cols h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; letter-spacing: -.01em; }
.foot-cols a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; color: var(--muted); transition: color .2s, transform .2s var(--ease); overflow-wrap: anywhere; }
.foot-cols a svg { width: 18px; height: 18px; color: var(--muted); transition: color .2s; }
.foot-cols a:hover { color: var(--text); transform: translateX(3px); }
.foot-cols a:hover svg { color: var(--link); }
.foot-legal { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 22px; flex-wrap: wrap; font-size: 13px; }
.foot-legal p { display: inline-flex; align-items: center; gap: 6px; }
.pin { width: 15px; height: 15px; }
.credits { max-width: 560px; }
.credits summary { cursor: pointer; }
.credits summary:hover { color: var(--text); }
.credits p { margin-top: 8px; display: block; }
.totop { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.totop:hover { color: var(--text); }
.totop svg { width: 15px; height: 15px; }

/* Motion: Apple-style hero entrance and scroll reveals */
@media (prefers-reduced-motion: no-preference) {
  .anim .h-in { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .anim .h-in:nth-child(2) { transition-delay: .12s; }
  .anim .h-in:nth-child(3) { transition-delay: .24s; }
  .anim .h-in:nth-child(4) { transition-delay: .36s; }
  .anim .h-in:nth-child(5) { transition-delay: .48s; }
  .anim.loaded .h-in { opacity: 1; transform: none; }
  .anim .hero-media { opacity: 0; transform: translateY(40px) scale(.96); transition: opacity 1.2s .5s var(--ease), transform 1.4s .5s var(--ease); }
  .anim.loaded .hero-media { opacity: 1; transform: none; }
  .anim .rv { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .anim .rv.in { opacity: 1; transform: none; }
  .dot { animation: led 2.4s ease-in-out infinite; }
  @keyframes led { 50% { opacity: .45; } }
}

/* Responsive */
@media (max-width: 900px) {
  .gnav-links { display: none; }
  .menu { display: grid; }
  .gnav-links.open { display: grid; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); padding: 12px 22px 24px; gap: 0; border-bottom: 1px solid var(--line); }
  .gnav-links.open a { font-size: 24px; font-weight: 600; padding: 10px 0; opacity: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card--big { grid-template-columns: 1fr; }
  .card-img { padding: 0 28px 28px; }
  .grid3, .ventures, .repos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 80px 18px; }
  .stats, .bento, .grid2, .grid3, .ventures, .repos, .foot-cols { grid-template-columns: 1fr; }
  .logo-txt small { display: none; }
  .nav-cv { padding: 8px 12px; }
  .tile--wide, .bento .tile:last-child { grid-column: auto; grid-row: auto; }
  .card--big .card-txt, .feature-txt { padding: 28px; }
  .feature { min-height: 480px; }
  .specs div { grid-template-columns: 1fr; gap: 4px; }
  .acc summary { grid-template-columns: 1fr 20px; }
  .acc summary em { grid-row: 2; }
  .hero-media img { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-transparency: reduce) { .gnav { background: var(--bg); backdrop-filter: none; } }

/* Book a meeting */
.nav-book { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 980px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 600 14px var(--font); cursor: pointer; transition: border-color .2s, transform .1s, background-color .2s; }
.nav-book:hover { border-color: var(--text); }
.nav-book:active { transform: scale(.96); }
.nav-book svg { width: 16px; height: 16px; }
.btn-book { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; }
.btn-book svg { width: 18px; height: 18px; }
.btn-book + .btn { background: transparent; color: var(--link); border: 1px solid var(--link); }
.btn-book + .btn:hover { background: color-mix(in srgb, var(--link) 10%, transparent); }
.foot-book { display: flex; align-items: center; gap: 10px; padding: 7px 0; font: 600 15px var(--font); color: var(--link); background: none; border: 0; cursor: pointer; transition: transform .2s var(--ease); }
.foot-book svg { width: 18px; height: 18px; }
.foot-book:hover { transform: translateX(3px); text-decoration: underline; }

.book { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 28px; background: var(--bg); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); overflow: auto; }
.book::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.book[open] { animation: book-in .45s var(--ease); }
.book[open]::backdrop { animation: fade .3s ease; }
@keyframes book-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.book-in { padding: 28px 28px 22px; display: grid; gap: 18px; }
.book-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.book-k { font-size: 14px; font-weight: 600; color: var(--muted); }
.book-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin-top: 2px; }
.book-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--alt); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.book-x:hover { background: var(--line); }
.book-x svg { width: 18px; height: 18px; }
.book-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.book-steps li { height: 4px; border-radius: 4px; background: var(--line); transition: background-color .3s; }
.book-steps li.on { background: var(--btn); }
.step { display: none; gap: 10px; }
.step.on { display: grid; animation: step-in .35s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
.q { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.q.small { font-size: 16px; margin-top: 10px; }
.opt { font-weight: 400; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); }
.err { font-size: 14px; color: #d70015; }
:root[data-theme="dark"] .err { color: #ff6961; }
.field, .select-wrap select { width: 100%; font: 400 17px var(--font); color: var(--text); background: var(--alt); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .2s, box-shadow .2s; }
.field:focus, .select-wrap select:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--btn) 22%, transparent); }
textarea.field { resize: vertical; min-height: 90px; line-height: 1.4; }
input[type="date"].field { min-height: 52px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--muted); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 10px 18px; border-radius: 980px; border: 1px solid var(--line); background: var(--alt); font-size: 15px; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.chips input:checked + span { background: var(--btn); border-color: var(--btn); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.book-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.book-foot .btn { margin-left: auto; border: 0; cursor: pointer; font: inherit; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; }
.book-foot .btn svg { width: 18px; height: 18px; }
.book-foot .btn.wa { background: #1f9e55; }
.book-foot .btn.wa:hover { background: #188a49; }
.book-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; color: var(--link); font: 400 17px var(--font); cursor: pointer; padding: 8px 0; }
.book-back svg { width: 15px; height: 15px; }
.book-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.book-note svg { width: 16px; height: 16px; color: #1f9e55; margin-top: 1px; }
.summary { display: grid; gap: 8px; background: var(--alt); border-radius: 16px; padding: 16px 18px; font-size: 15px; }
.summary div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; }
@media (max-width: 900px) { .nav-book span { display: none; } .nav-book { padding: 8px 10px; } }
@media (max-width: 640px) { .book { border-radius: 24px; } .book-in { padding: 22px 20px 18px; } .book-head h2 { font-size: 25px; } }
@media (prefers-reduced-motion: reduce) { .book[open], .step.on, .book[open]::backdrop { animation: none; } }
.book-back[hidden] { display: none; }
.logo-txt { white-space: nowrap; }
@media (max-width: 480px) {
  .gnav-in { gap: 10px; padding: 0 14px; }
  .gnav-right { gap: 4px; }
  .nav-cv { padding: 8px 11px; font-size: 0; gap: 0; }
  .nav-cv svg { width: 17px; height: 17px; }
}

/* G. Nepal logo */
.gn-logo { display: inline-block; flex: none; object-fit: contain; }
.nav-gn { display: inline-flex; align-items: center; gap: 6px; }
.nav-gn .gn-logo { width: 18px; height: 18px; }
.gn-title { display: flex; align-items: center; gap: 16px; }
.gn-title .gn-logo { width: 1.15em; height: 1.15em; }
.acc summary.has-logo { grid-template-columns: 34px 1fr auto 20px; }
.acc summary.has-logo .gn-logo { width: 34px; height: 34px; }
.foot-cols a .gn-logo { width: 18px; height: 18px; }
.gnav-links.open .nav-gn .gn-logo { width: 24px; height: 24px; }
@media (max-width: 640px) {
  .acc summary.has-logo { grid-template-columns: 30px 1fr 20px; }
  .acc summary.has-logo .gn-logo { width: 30px; height: 30px; grid-row: span 2; align-self: start; }
  .acc summary.has-logo em { grid-column: 2; }
  .acc summary.has-logo svg { grid-column: 3; grid-row: 1; }
}

/* ===== Electrical layer: circuit traces, current, sine, scope grid ===== */
:root { --trace: rgba(29, 29, 31, .10); --current: #0071e3; }
:root[data-theme="dark"] { --trace: rgba(245, 245, 247, .10); --current: #2997ff; }
.hero { position: relative; overflow: hidden; }
.hero > *:not(.traces) { position: relative; z-index: 1; }
.traces { position: absolute; left: 0; top: 0; width: 100%; height: 760px; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 95%); mask-image: linear-gradient(to bottom, #000 55%, transparent 95%); }
.t-lines { stroke: var(--trace); }
.t-pads { stroke: var(--trace); fill: var(--bg); }
.t-pulse { stroke: var(--current); stroke-dasharray: 46 900; stroke-dashoffset: 946; }
.t-pulse path { animation: current 5.5s linear infinite; }
.t-pulse path:nth-child(2) { animation-delay: 1.4s; }
.t-pulse path:nth-child(3) { animation-delay: 2.8s; }
.t-pulse path:nth-child(4) { animation-delay: 4.1s; }
@keyframes current { to { stroke-dashoffset: 0; } }

.grid-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 980px; border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sine { width: 40px; height: 12px; }
.sine path { fill: none; stroke: var(--current); stroke-width: 1.8; stroke-dasharray: 6 4; animation: ac 1s linear infinite; }
@keyframes ac { to { stroke-dashoffset: -20; } }

/* schematic divider: resistor, capacitor, inductor, AC source */
.schem { display: flex; align-items: center; color: var(--muted); margin-bottom: 44px; }
.schem span { flex: 1; height: 1.5px; background: var(--line); }
.schem svg { width: 240px; height: 22px; flex: none; }
.anim .schem.rv span { transform: scaleX(0); transition: transform 1.2s var(--ease); transform-origin: left; }
.anim .schem.rv span:last-child { transform-origin: right; }
.anim .schem.rv.in span { transform: scaleX(1); }

/* stats as oscilloscope tiles */
.stat { position: relative; overflow: hidden; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 40'%3E%3Cpath d='M0 20 C15 2 30 2 45 20 S75 38 90 20 S120 2 135 20 S165 38 180 20 S210 2 225 20 S240 30 240 30' fill='none' stroke='%230071e3' stroke-opacity='.22' stroke-width='2'/%3E%3C/svg%3E") left 0 bottom 14px / 100% 34px no-repeat, var(--card); }
.stat > * { position: relative; }
.stat-ico { width: 22px; height: 22px; color: var(--current); margin-bottom: 14px; display: block; }

/* power flowing along the top edge of cards on hover */
.card, .tile, .venture, .repo { position: relative; }
.card::before, .tile::before, .venture::before, .repo::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px; z-index: 2;
  background: var(--current); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.card:hover::before, .tile:hover::before, .venture:hover::before, .repo:hover::before { transform: scaleX(1); }

@media (max-width: 640px) { .grid-tag { margin: 8px 0 0; } .schem svg { width: 170px; } .traces { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .t-pulse { display: none; } .sine path { animation: none; } }

/* Made by Keshav: apps */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.app { position: relative; background: var(--alt); border-radius: 28px; padding: 30px; display: flex; flex-direction: column; gap: 14px; transition: transform .5s var(--ease); }
.app:hover { transform: translateY(-3px); }
.app::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; border-radius: 2px; background: var(--current); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.app:hover::before { transform: scaleX(1); }
.app--hero { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.15fr; grid-template-rows: auto auto 1fr; column-gap: 40px; align-items: start; }
.app--hero > :not(.app-shot) { grid-column: 1; }
.app-shot { grid-column: 2; grid-row: 1 / span 3; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 34px rgba(0, 0, 0, .12); }
.app-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.app-shot:hover img { transform: scale(1.02); }
.app-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.app-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.app-icon svg { width: 26px; height: 26px; }
.app-icon.solar { background: #f5a524; }
.app-icon.calc { background: #0071e3; }
.app-icon.table { background: #1f8a4c; }
.app-icon.ext { background: #d93025; }
.app-icon.gear { background: #5e5ce6; }
.app h3 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.app--hero h3 { font-size: 30px; }
.app-tag { font-size: 14px; color: var(--muted); }
.app > p:not(.app-badge) { font-size: 16px; color: var(--muted); }
.app-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--green); }
.app--hero .app-top .app-badge { flex-basis: 100%; }
.app-badge svg { width: 15px; height: 15px; }
.app-badge.dl { color: var(--link); }
.app-badge.soon { color: var(--muted); font-weight: 500; }
.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: auto; padding-top: 6px; }
.app-actions .btn { font-size: 16px; padding: 10px 20px; }
@media (max-width: 900px) {
  .app--hero { grid-template-columns: 1fr; }
  .app-shot { grid-column: 1; grid-row: auto; order: 10; }
}
@media (max-width: 640px) { .apps { grid-template-columns: 1fr; } .app { padding: 24px; } }
.app-icon.cable { background: #1d4f91; }
.app--flip { grid-template-columns: 1.15fr 1fr; }
.app--flip > :not(.app-shot) { grid-column: 2; }
.app--flip .app-shot { grid-column: 1; }
@media (max-width: 900px) { .app--flip { grid-template-columns: 1fr; } .app--flip > :not(.app-shot), .app--flip .app-shot { grid-column: 1; } }

/* ===== Icons ===== */
.sec-badge { display: inline-grid; place-items: center; width: .95em; height: .95em; margin-right: .28em; vertical-align: -.1em; color: var(--current); }
.sec-badge svg { width: 100%; height: 100%; }
.big .sec-badge { width: .8em; height: .8em; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eb-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: var(--bg); }
.eb-ico svg { width: 16px; height: 16px; }
.tile-k { display: inline-flex; align-items: center; gap: 7px; }
.tile-k svg { width: 17px; height: 17px; color: var(--current); }
.feature .tile-k svg { color: #9ecbff; }
.card h4 { display: flex; align-items: center; gap: 8px; }
.card h4 svg { width: 19px; height: 19px; color: var(--current); flex: none; }
.acc summary.has-ico { grid-template-columns: 34px 1fr auto 20px; }
.exp-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--current); background: color-mix(in srgb, var(--current) 12%, transparent); }
.exp-ico svg { width: 18px; height: 18px; }
.specs dt { display: flex; align-items: center; gap: 10px; }
.specs dt svg { width: 20px; height: 20px; color: var(--current); }
.v-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; vertical-align: -4px; color: var(--current); transition: transform .4s var(--ease); }
.venture:hover .v-ico { transform: rotate(-6deg) scale(1.06); }
.v-ico svg { width: 22px; height: 22px; }
.lead-ico { width: 18px !important; height: 18px !important; margin-right: 6px; }
.btn .lead-ico { vertical-align: -3px; }
.tile:hover .tile-k svg, .card:hover .tile-k svg { transform: scale(1.12); }
.tile-k svg, .card h4 svg { transition: transform .3s var(--ease); }
@media (max-width: 640px) {
  .acc summary.has-ico { grid-template-columns: 30px 1fr 20px; }
  .acc summary.has-ico .exp-ico { width: 30px; height: 30px; grid-row: span 2; align-self: start; }
  .acc summary.has-ico em { grid-column: 2; }
  .acc summary.has-ico > svg { grid-column: 3; grid-row: 1; }
}
.link:hover .lead-ico { transform: none; }
.venture .status { position: absolute; top: 26px; right: 24px; }
.venture h3 { padding-right: 96px; }
.stat { padding-bottom: 64px; }
.venture h3 { margin-top: 22px; padding-right: 0; }
.venture .status { top: 22px; left: 26px; right: auto; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
