:root {
  --background: #f7f7f5;
  --surface: #efefec;
  --text: #171816;
  --muted: #62645f;
  --faint: #6f726b;
  --line: #d9dad5;
  --accent: #176b52;
  --accent-soft: #dfece6;
  --nepal-red: #c9283e;
  --nepal-blue: #164b78;
  --nepal-gold: #d69a27;
  --header: rgba(247, 247, 245, .9);
  --shadow: rgba(0, 0, 0, .08);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --width: 940px;
}

html[data-theme="dark"] {
  --background: #0b0d0c;
  --surface: #151816;
  --text: #edede8;
  --muted: #a0a49d;
  --faint: #8f948b;
  --line: #292d2a;
  --accent: #72c7a5;
  --accent-soft: #18372c;
  --nepal-red: #f05a67;
  --nepal-blue: #64a2d8;
  --nepal-gold: #e8b84a;
  --header: rgba(11, 13, 12, .9);
  --shadow: rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; scroll-padding-top: 96px; }
html[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; overflow-x: hidden; color: var(--text); background: var(--background); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; transition: color .25s, background-color .25s; }
body::selection { color: white; background: var(--accent); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.text-link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.text-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.wrap { width: min(calc(100% - 48px), var(--width)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 20px; padding: 10px 14px; color: white; background: var(--accent); }
.skip-link:focus { top: 16px; }

.header { position: sticky; z-index: 20; top: 0; background: var(--header); border-bottom: 1px solid transparent; backdrop-filter: blur(12px); }
.header.scrolled { border-color: var(--line); }
.scroll-progress { position: absolute; top: 0; left: 0; width: var(--scroll-progress, 0%); height: 2px; background: var(--accent); transition: width .08s linear; }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.nav nav { display: flex; align-items: center; gap: 28px; color: var(--muted); font-size: 13px; }
.nav nav a { position: relative; transition: color .2s; }
.nav nav a:hover, .nav nav a.active { color: var(--text); }
.nav nav a[data-section-link]::after { content: ""; position: absolute; right: 0; bottom: -8px; left: 0; height: 1px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.nav nav a.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.theme-button, .menu-button { color: var(--muted); border: 1px solid var(--line); background: transparent; cursor: pointer; font: 500 11px var(--mono); }
.theme-button { padding: 7px 10px; transition: color .2s, border-color .2s; }
.theme-button:hover { color: var(--accent); border-color: var(--accent); }
.theme-button span:first-child { display: inline-block; width: 14px; margin-right: 3px; font-size: 13px; text-align: center; transition: transform .25s; }
html[data-theme="dark"] .theme-button span:first-child { transform: rotate(180deg); }
.menu-button { display: none; padding: 7px 10px; }

.hero { position: relative; isolation: isolate; padding-block: clamp(110px, 17vw, 180px) clamp(58px, 6vw, 76px); }
.hero > :not(.nepal-mark, .nepal-kite, .nepal-birds) { position: relative; z-index: 1; }
.nepal-kite { position: absolute; z-index: 0; top: 10px; left: -112px; width: 82px; pointer-events: none; transform: rotate(-6deg); opacity: .78; animation: kite-drift 6.5s ease-in-out infinite; }
.nepal-kite svg { display: block; width: 100%; height: auto; overflow: visible; }
.kite-string { fill: none; stroke: var(--faint); stroke-width: 1.15; stroke-linecap: round; stroke-dasharray: 3 4; animation: kite-string-flow 7s linear infinite; }
.kite-paper { stroke: none; }
.kite-paper-red { fill: var(--nepal-red); }
.kite-paper-blue { fill: var(--nepal-blue); }
.kite-frame { fill: none; stroke: var(--nepal-gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.kite-knot { fill: var(--nepal-gold); }
.nepal-birds { position: absolute; z-index: 0; top: 34px; left: 76px; width: 138px; color: var(--faint); pointer-events: none; opacity: .48; animation: flock-glide 12s ease-in-out infinite; }
.nepal-birds svg { display: block; width: 100%; height: auto; overflow: visible; }
.bird { fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; transform-box: fill-box; transform-origin: center; animation: wing-beat 2.2s ease-in-out infinite alternate; }
.bird-two { animation-delay: -.7s; }
.bird-three { animation-delay: -1.3s; }
.bird-four { animation-delay: -.3s; }
.nepal-mark { position: absolute; z-index: 0; top: 48px; right: -112px; width: 330px; color: var(--accent); }
.nepal-mark svg { display: block; width: 100%; height: auto; overflow: visible; }
.nepal-mark path, .nepal-mark circle { vector-effect: non-scaling-stroke; }
.nepal-sun { fill: var(--nepal-red); stroke: var(--nepal-red); stroke-width: 1; opacity: .32; transform-box: fill-box; transform-origin: center; animation: sun-breathe 7s ease-in-out infinite; }
.nepal-orbit { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 6; opacity: .42; }
.nepal-mark:not([data-active-slide="0"]) .nepal-sun, .nepal-mark:not([data-active-slide="0"]) .nepal-orbit { opacity: 0; animation: none; }
.nepal-peak { fill: var(--background); stroke: var(--accent); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; opacity: .42; }
.nepal-peak-back { opacity: .28; }
.nepal-snow { fill: none; stroke: var(--text); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; opacity: .22; }
.nepal-terrace { fill: none; stroke: var(--accent); stroke-width: 1; stroke-linecap: round; opacity: .34; }
.nepal-slides { position: absolute; z-index: 1; top: 158px; right: -4px; width: 238px; height: 250px; }
.nepal-slide { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; margin: 0; opacity: 0; visibility: hidden; transform: translateX(10px) scale(.98); transition: opacity .8s ease, transform .8s ease, visibility .8s; }
.nepal-slide.is-active { opacity: 1; visibility: visible; transform: translateX(0) scale(1); }
.nepal-slide img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; opacity: .86; filter: saturate(.58) contrast(.94) drop-shadow(0 9px 13px rgba(0, 0, 0, .1)); }
.nepal-slide-stupa img { width: 126px; }
.nepal-slide-landscape img { width: 230px; margin-bottom: 17px; }
.nepal-slide figcaption { position: absolute; top: 48%; right: -25px; color: var(--faint); font: 500 8px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; writing-mode: vertical-rl; opacity: 0; transform: translate(5px, -50%); transition: opacity .25s, transform .25s; }
.nepal-mark:hover .nepal-slide.is-active figcaption, .nepal-mark:focus-within .nepal-slide.is-active figcaption { opacity: .82; transform: translate(0, -50%); }
.nepal-carousel-controls { position: absolute; z-index: 3; right: 20px; bottom: 29px; display: flex; gap: 7px; padding: 6px; }
.nepal-carousel-controls button { width: 5px; height: 5px; padding: 0; border: 0; border-radius: 50%; background: var(--faint); opacity: .35; cursor: pointer; transition: width .25s, border-radius .25s, opacity .25s, background-color .25s; }
.nepal-carousel-controls button.is-active { width: 18px; border-radius: 9px; background: var(--accent); opacity: .9; }
.nepal-carousel-controls button:focus-visible { outline-offset: 3px; }
.status, .label, .stack, .project-number, time { font-family: var(--mono); }
.status { display: flex; align-items: center; gap: 10px; margin: 0 0 32px; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.status span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { max-width: 850px; margin: 0; font-size: clamp(48px, 7vw, 78px); line-height: 1.08; letter-spacing: -.058em; font-weight: 500; text-wrap: balance; }
.hero-summary { max-width: 520px; margin-top: 48px; }
.hero-summary p { margin: 0; color: var(--muted); font-size: 15px; }
.hero-summary strong { color: var(--text); font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 48px; }
.links a { padding-bottom: 2px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 500; transition: color .2s, border-color .2s; }
.links a:hover { color: var(--accent); border-color: var(--accent); }
.links span, .contact a span { margin-left: 5px; color: var(--accent); }

.section { padding-block: 74px; border-top: 1px solid var(--line); }
@keyframes kite-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  35% { transform: translate3d(7px, -8px, 0) rotate(-2deg); }
  70% { transform: translate3d(-3px, -3px, 0) rotate(-9deg); }
}

@keyframes kite-string-flow {
  to { stroke-dashoffset: -28; }
}

@keyframes flock-glide {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(12px, -5px, 0); }
}

@keyframes wing-beat {
  from { transform: scaleY(.72); }
  to { transform: scaleY(1.08); }
}

@keyframes sun-breathe {
  0%, 100% { opacity: .26; transform: scale(.96); }
  50% { opacity: .4; transform: scale(1.04); }
}

.section-head { display: grid; grid-template-columns: 180px 1fr; align-items: baseline; margin-bottom: 60px; }
.section-head-action { grid-template-columns: 180px 1fr auto; column-gap: 24px; }
.label { margin: 0; color: var(--accent); font-size: 10px; font-weight: 500; letter-spacing: .11em; text-transform: uppercase; }
.section-head h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; letter-spacing: -.04em; font-weight: 500; text-wrap: balance; }
.section-action { padding-bottom: 3px; color: var(--muted); border-bottom: 1px solid var(--line); font: 500 10px var(--mono); white-space: nowrap; transition: color .2s, border-color .2s; }
.section-action span { margin-left: 4px; color: var(--accent); }
.section-action:hover { color: var(--accent); border-color: var(--accent); }

.experience-list { border-top: 1px solid var(--line); }
.experience-item { display: grid; grid-template-columns: 180px 1fr; gap: 0; padding-block: 38px 42px; border-bottom: 1px solid var(--line); }
.experience-meta { padding-right: 30px; }
.experience-meta p { margin: 0 0 6px; font-size: 13px; font-weight: 500; line-height: 1.45; }
.experience-meta p span { display: block; margin-top: 4px; color: var(--faint); font-size: 10px; font-weight: 400; }
.experience-meta p .current-role { display: inline-block; margin: 0 0 0 6px; padding: 2px 6px; color: var(--accent); background: var(--accent-soft); border-radius: 99px; font: 500 8px var(--mono); letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.experience-meta time { color: var(--faint); font-size: 10px; }
.experience-copy h3 { margin: 0 0 12px; font-size: 17px; letter-spacing: -.02em; font-weight: 550; }
.experience-copy h3 span { color: var(--faint); font-weight: 400; }
.experience-copy > p:not(.stack) { max-width: 680px; margin: 0; color: var(--muted); font-size: 14px; }
.experience-copy > p:not(.stack) + p:not(.stack) { margin-top: 10px; }
.impact-list { display: grid; gap: 9px; max-width: 680px; margin: 18px 0 0; padding: 0; list-style: none; }
.impact-list li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.impact-list li::before { display: none; }
.impact-list strong { color: var(--text); font: 500 10px/1.8 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.stack { margin: 18px 0 0; color: var(--accent); font-size: 10px; line-height: 1.6; }

.work-list { border-top: 1px solid var(--line); }
.project { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 40px; padding: 38px 0 42px; border-bottom: 1px solid var(--line); transition: color .2s; }
a.project:hover { color: var(--accent); }
.project-number { display: flex; gap: 10px; margin: 0 0 17px; color: var(--faint); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.project-number span { color: var(--accent); }
.project h3 { margin: 0 0 12px; font-size: 21px; letter-spacing: -.025em; font-weight: 550; }
.project > div > p:not(.project-number, .stack) { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.project-link { align-self: center; color: var(--faint); font: 500 9px var(--mono); letter-spacing: .05em; text-transform: uppercase; transition: color .2s, transform .2s; }
.project-link span { margin-left: 4px; color: var(--accent); font-size: 16px; vertical-align: -1px; }
a.project:hover .project-link { color: var(--accent); transform: translate(3px, -3px); }
.upcoming-projects { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; margin-top: 58px; padding: 34px 0 4px; border-top: 1px solid var(--line); }
.upcoming-intro h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.025em; font-weight: 550; }
.upcoming-intro p { max-width: 390px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.upcoming-list { display: grid; gap: 0; }
.upcoming-list article { padding: 0 0 24px; }
.upcoming-list article + article { padding-top: 24px; border-top: 1px solid var(--line); }
.upcoming-list p { margin: 0 0 8px; color: var(--accent); font: 500 9px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.upcoming-list h4 { margin: 0 0 8px; font-size: 15px; font-weight: 550; }
.upcoming-list span { display: block; color: var(--faint); font-size: 12px; line-height: 1.7; }

.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 85px; }
.about-copy p { max-width: 590px; margin: 0 0 20px; font-size: 14px; line-height: 1.75; letter-spacing: -.01em; }
.details { display: flex; flex-direction: column; gap: 30px; }
.details div { padding-top: 16px; border-top: 1px solid var(--line); }
.details h3 { margin: 0 0 9px; font-size: 12px; font-weight: 550; }
.details p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.credential-list { border-top: 1px solid var(--line); }
.credential-list > div { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 24px; padding-block: 26px; border-bottom: 1px solid var(--line); }
.credential-mark { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); overflow: hidden; }
.credential-mark img { display: block; width: auto; height: auto; object-fit: contain; }
.credential-mark-claude { border-color: rgba(217, 119, 87, .3); background: rgba(217, 119, 87, .07); }
.credential-mark-claude img { width: 32px; height: 32px; }
.credential-mark-databricks { border-color: rgba(255, 54, 33, .3); background: rgba(255, 54, 33, .07); }
.credential-mark-databricks img { width: 32px; height: auto; }
.credential-list p { margin: 0; }
.credential-list strong { display: block; font-size: 15px; font-weight: 500; }
.credential-list small { display: block; margin-top: 3px; color: var(--faint); font-size: 11px; }

.education-card { display: grid; grid-template-columns: 180px 1fr; min-height: 190px; padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.education-icon { display: grid; place-items: center; width: 54px; height: 54px; color: var(--accent); border: 1px solid var(--line); border-radius: 50%; }
.education-icon svg { width: 28px; height: 28px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.education-card h3 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; font-weight: 500; }
.education-card p { margin: 3px 0; color: var(--muted); font-size: 14px; }
.education-card .honours { margin-bottom: 25px; color: var(--accent); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }

.contact { padding-block: 120px; border-top: 1px solid var(--line); }
.contact h2 { max-width: 680px; margin: 22px 0; font-size: clamp(38px, 6vw, 64px); line-height: 1.1; letter-spacing: -.052em; font-weight: 500; text-wrap: balance; }
.contact > p:not(.label) { max-width: 590px; margin: 0 0 38px; color: var(--muted); }
.contact a { display: inline-block; padding-bottom: 4px; color: var(--accent); border-bottom: 1px solid #9ab9ae; font: 500 clamp(14px, 2vw, 18px) var(--mono); }

.footer { display: flex; justify-content: space-between; gap: 18px; padding-block: 28px; color: var(--faint); border-top: 1px solid var(--line); font: 400 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.footer p { margin: 0; }
.footer time { color: var(--accent); }

@media (max-width: 700px) {
  .wrap { width: min(calc(100% - 34px), var(--width)); }
  .menu-button { display: block; }
  .nav nav { position: absolute; top: 64px; right: 17px; left: 17px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px; background: var(--background); border: 1px solid var(--line); box-shadow: 0 18px 40px var(--shadow); }
  .nav nav.open { display: flex; }
  .nav nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav nav a:last-child { border: 0; }
  .nav nav a[data-section-link]::after { display: none; }
  .hero { padding-block: 90px 72px; }
  .nepal-kite { top: -14px; left: auto; right: -8px; width: 52px; opacity: .3; }
  .nepal-birds { display: none; }
  .nepal-mark { top: 118px; right: -118px; width: 238px; opacity: .18; }
  .nepal-slides { top: 108px; right: 0; width: 168px; height: 184px; }
  .nepal-slide-stupa img { width: 88px; }
  .nepal-slide-landscape img { width: 162px; margin-bottom: 10px; }
  .nepal-slide figcaption, .nepal-carousel-controls { display: none; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 50px); }
  .hero-summary { margin-top: 36px; }
  .links { gap: 20px; margin-top: 38px; }
  .section { padding-block: 70px; }
  .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 42px; }
  .section-head-action { grid-template-columns: 1fr; }
  .section-action { justify-self: start; margin-top: 5px; }
  .experience-item { grid-template-columns: 1fr; gap: 20px; padding-block: 30px 34px; }
  .experience-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-right: 0; }
  .experience-meta p { max-width: 58%; }
  .experience-meta time { text-align: right; }
  .impact-list li { grid-template-columns: 68px 1fr; gap: 8px; }
  .project { gap: 18px; }
  .project-link { align-self: flex-start; margin-top: 4px; }
  .upcoming-projects { grid-template-columns: 1fr; gap: 34px; margin-top: 46px; }
  .about-grid { grid-template-columns: 1fr; gap: 50px; }
  .education-card { grid-template-columns: 60px 1fr; gap: 18px; min-height: 0; }
  .contact { padding-block: 88px; }
  .contact a { font-size: 13px; }
}

@media (max-width: 460px) {
  .footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .project { grid-template-columns: 1fr; }
  .project-link { justify-self: start; }
  .credential-list > div { grid-template-columns: 64px 1fr; gap: 16px; }
  .credential-mark { width: 56px; height: 56px; border-radius: 15px; }
  .credential-mark-claude img { width: 29px; height: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
