:root {
  /* Ghat stone (light theme) */
  --bg: #ECEFEA;
  --surface: #F7F8F4;
  --ink: #101B33;
  --muted: #48546E;
  --line: #C6CEC8;
  --link: #1F4FA8;
  --accent: #F0A202;
  /* marigold */
  --accent-hover: #FFB61E;
  --on-accent: #101B33;

  /* River night: the work section and hero window stay dark in both themes */
  --work-bg: #0C1428;
  --tile: #142042;
  --tile-line: #293873;
  --work-ink: #EEF1F8;
  --work-muted: #A6B2CE;

  /* One colour per kind of site */
  --c-ecom: #F5B301;
  --c-lead: #7FB2FF;
  --c-company: #4FD1B5;
  --c-beauty: #FF8FB1;
  --c-ngo: #B79CFF;
  --c-edu: #FF9E6B;
  --c-travel: #8BD46E;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: clamp(20px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1020;
    --surface: #111A33;
    --ink: #EEF1F8;
    --muted: #A6B2CE;
    --line: #25304F;
    --link: #8DB4FF;
    --work-bg: #101A36;
    --tile: #182650;
    --tile-line: #2E3F7C;
  }
}

:root[data-theme="dark"] {
  --bg: #0A1020;
  --surface: #111A33;
  --ink: #EEF1F8;
  --muted: #A6B2CE;
  --line: #25304F;
  --link: #8DB4FF;
  --work-bg: #101A36;
  --tile: #182650;
  --tile-line: #2E3F7C;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block
}

[hidden] {
  display: none !important
}

a {
  color: var(--link)
}

h1,
h2,
h3 {
  font-family: var(--sans);
  margin: 0
}

p {
  margin: 0
}

ul,
ol,
dl,
dd {
  margin: 0
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px
}

.work :focus-visible {
  outline-color: var(--accent)
}

.contact :focus-visible {
  outline-color: var(--on-accent)
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 6px;
  font: 600 1rem var(--sans);
  text-decoration: none
}

.skip:focus {
  top: 12px
}

.wrap {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto
}

[id] {
  scroll-margin-top: 84px
}

/* Header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line)
}

.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 700 1rem var(--sans);
  font-stretch: 112%
}

.brand {
  white-space: nowrap
}

.brand svg {
  flex: none
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px
}

.nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font: 500 .95rem var(--sans)
}

.nav a:not(.btn):hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent)
}

.btn-primary:hover {
  background: var(--accent-hover)
}

.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent
}

.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg)
}

.btn-sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: .95rem
}

@media (max-width:760px) {
  .hide-sm {
    display: none
  }

  .nav {
    gap: 18px
  }
}

@media (max-width:420px) {
  .brand {
    font-size: .95rem
  }

  .nav {
    gap: 14px
  }
}

@media (max-width:374px) {
  .brand span.brand-text {
    display: none
  }

  .head-in {
    gap: 10px
  }
}

/* Hero */
.hero {
  padding: clamp(36px, 6vw, 80px) 0 clamp(52px, 8vw, 104px)
}

.name {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .92;
  letter-spacing: -.025em;
  font-size: clamp(2.1rem, 9vw, 8.5rem);
}

.name .l1 {
  display: inline-block;
  white-space: nowrap
}

.name .l2 {
  display: block;
  text-align: right
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(28px, 4vw, 52px)
}

.hi {
  font-family: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--muted);
  margin-bottom: 18px
}

.lede {
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  line-height: 1.42;
  max-width: 32ch
}

.lede-sub {
  margin-top: 16px;
  color: var(--muted);
  max-width: 44ch
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px
}

@media (max-width:860px) {
  .hero-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width:520px) {
  .win-plat {
    display: none
  }

  .win-body {
    min-height: 240px
  }
}

/* Browser window (hero) */
.win {
  background: var(--tile);
  border: 1px solid var(--tile-line);
  border-radius: 10px;
  overflow: hidden;
  color: var(--work-ink)
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--tile-line)
}

.win-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: var(--work-ink);
  text-decoration: none;
  font: 500 .95rem var(--sans)
}

.win-url:hover {
  background: rgba(255, 255, 255, .14)
}

.win-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.win-url svg {
  flex: none;
  opacity: .75
}

.win-plat {
  font: 500 .85rem var(--sans);
  color: var(--work-muted);
  white-space: nowrap
}

.win-body {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px
}

.win-body img.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--tile);
  z-index: 0;
  margin: 0 !important;
  animation: none !important
}

.win-name {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--c);
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  overflow-wrap: anywhere
}

.win-type {
  position: relative;
  z-index: 1;
  font: 600 .95rem var(--sans);
  color: var(--c)
}

.win-desc {
  position: relative;
  z-index: 1;
  color: var(--work-muted);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 36ch
}

.win-body.has-shot> :not(.shot) {
  opacity: 0 !important;
  pointer-events: none
}

.win-body.in> :not(.shot) {
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both
}

.win-body.in> :not(.shot):nth-child(3) {
  animation-delay: .05s
}

.win-body.in> :not(.shot):nth-child(4) {
  animation-delay: .1s
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.win-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--tile-line);
  color: var(--work-muted);
  font: 500 .9rem var(--sans)
}

.win-ctl {
  display: flex;
  gap: 6px
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--tile-line);
  background: transparent;
  color: var(--work-ink);
  cursor: pointer;
  display: grid;
  place-items: center
}

.icon-btn:hover {
  border-color: var(--work-ink)
}

.win :focus-visible {
  outline-color: var(--accent)
}

/* Work */
.work {
  background: var(--work-bg);
  color: var(--work-ink);
  padding: clamp(56px, 8vw, 112px) 0
}

h2.h2 {
  font-weight: 800;
  font-stretch: 115%;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.02em
}

.sub {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--muted)
}

.work .sub {
  color: var(--work-muted)
}

.filters {
  display: grid;
  gap: 12px;
  margin: 34px 0 14px
}

.fgroup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0
}

.flabel {
  flex: none;
  width: 64px;
  font: 500 .95rem var(--sans);
  color: var(--work-muted)
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 6px;
  margin: -4px;
  scrollbar-width: thin;
  min-width: 0;
  flex: 1
}

.chip {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--tile-line);
  background: transparent;
  color: var(--work-ink);
  font: 500 .95rem var(--sans);
  cursor: pointer
}

.chip:hover {
  border-color: var(--work-ink)
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent)
}

.count {
  margin-bottom: 30px;
  color: var(--work-muted);
  font: 500 .95rem var(--sans)
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 28px
}

@media (max-width:1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width:620px) {
  .grid {
    grid-template-columns: 1fr
  }

  .fgroup {
    align-items: stretch;
    flex-direction: column;
    gap: 6px
  }

  .flabel {
    width: auto
  }

  .chips {
    flex: none;
    width: calc(100% + 8px)
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit
}

.tile-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 6px
}

.tile {
  display: flex;
  flex-direction: column;
  aspect-ratio: 16/10;
  background: var(--tile);
  border: 1px solid var(--tile-line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .2s
}

.card:hover .tile,
.tile-link:focus-visible .tile {
  border-color: var(--c)
}

.tile-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--tile-line);
  font: 500 .85rem var(--sans);
  color: var(--work-muted)
}

.tile-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tile-bar svg {
  flex: none;
  opacity: .75
}

.tile-body {
  position: relative;
  flex: 1;
  min-height: 0
}

.tile-name {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .96;
  letter-spacing: -.02em;
  color: var(--c);
  overflow-wrap: anywhere;
  transition: transform .25s
}

.card:hover .tile-name {
  transform: translateY(-4px)
}

.tile-body img.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: var(--tile)
}

.tile-body.has-shot .tile-name {
  opacity: 0
}

.tile-body.has-shot {
  background: var(--tile)
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px
}

.card-type {
  font: 700 .95rem var(--sans);
  color: var(--c);
  margin-right: 4px
}

.pill {
  font: 500 .8rem var(--sans);
  color: var(--work-muted);
  border: 1px solid var(--tile-line);
  border-radius: 999px;
  padding: 2px 10px
}

.card-note {
  margin-top: 8px;
  color: var(--work-ink);
  font-size: 1.05rem;
  line-height: 1.45
}

.card-also {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center
}

.card-also-label {
  font: 500 .85rem var(--sans);
  color: var(--work-muted);
  margin-right: 2px
}

.also-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font: 500 .9rem var(--sans);
  color: var(--work-ink);
  border: 1px solid var(--tile-line);
  border-radius: 999px;
  text-decoration: none
}

.also-link:hover {
  border-color: var(--c)
}

.card-result {
  margin-top: 6px;
  font: 600 .95rem var(--sans);
  color: var(--accent)
}

.empty {
  padding: 36px 0;
  color: var(--work-muted)
}

.empty .btn {
  margin-top: 14px
}

.work noscript ul {
  columns: 2;
  padding-left: 1.2em
}

.work noscript a {
  color: var(--work-ink)
}

/* Sections with a side heading */
.section {
  padding: clamp(56px, 8vw, 104px) 0
}

.section.alt {
  background: var(--surface)
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start
}

.split-head {
  position: sticky;
  top: 100px
}

@media (max-width:860px) {
  .split {
    grid-template-columns: 1fr
  }

  .split-head {
    position: static
  }
}

.rows>div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: 8px 32px;
  padding: 26px 0;
  border-top: 1px solid var(--line)
}

.rows>div:last-child {
  border-bottom: 1px solid var(--line)
}

.rows dt {
  font: 700 1.15rem/1.25 var(--sans);
  font-stretch: 108%
}

.rows dd {
  max-width: 60ch
}

@media (max-width:620px) {
  .rows>div {
    grid-template-columns: 1fr
  }
}

.rows+h3 {
  margin-top: 48px
}

h3.h3 {
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  margin-bottom: 14px
}

.rows ul {
  padding-left: 1.1em
}

/* Experience */
.jobs {
  list-style: none;
  padding: 0;
  margin-top: 40px
}

.job {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px 40px;
  padding: 32px 0;
  border-top: 1px solid var(--line)
}

.job:last-child {
  border-bottom: 1px solid var(--line)
}

.job-when {
  font: 500 1rem var(--sans);
  color: var(--muted)
}

.job h3 {
  font-weight: 700;
  font-stretch: 110%;
  font-size: 1.4rem;
  line-height: 1.2
}

.job-org {
  color: var(--muted);
  margin: 4px 0 12px
}

.job ul {
  padding-left: 1.15em;
  max-width: 64ch
}

.job li {
  margin-bottom: 6px
}

.job li::marker {
  color: var(--muted)
}

@media (max-width:760px) {
  .job {
    grid-template-columns: 1fr
  }
}

/* Contact */
.contact {
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(56px, 8vw, 112px) 0
}

.contact p.sub {
  color: var(--on-accent);
  opacity: .85;
  max-width: 46ch
}

.mail {
  display: inline-block;
  margin-top: 28px;
  color: var(--on-accent);
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 120%;
  font-size: clamp(1.15rem, 5.2vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-decoration: underline;
  text-decoration-thickness: .07em;
  text-underline-offset: .16em;
  overflow-wrap: anywhere
}

.mail:hover {
  text-decoration-thickness: .14em
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px 32px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 2px solid var(--on-accent)
}

.details dt {
  font: 700 1rem var(--sans);
  margin-bottom: 2px
}

.details a {
  color: var(--on-accent)
}

/* Footer */
.foot {
  padding: 28px 0 36px;
  color: var(--muted);
  font: 500 .95rem var(--sans)
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important
  }
}

/* ---------- Additions for the two-page layout ---------- */
.nav a[aria-current="page"]:not(.btn) {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 7px
}

/* Work page: page header (dark, so the grid below reads as one continuous surface) */
.page-head {
  background: var(--work-bg);
  color: var(--work-ink);
  padding: clamp(40px, 6vw, 88px) 0 0
}

.page-head .crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--work-muted);
  font: 500 .95rem var(--sans);
  text-decoration: none;
  min-height: 44px
}

.page-head .crumb:hover {
  color: var(--work-ink)
}

.page-head h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-stretch: 118%;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.025em;
  margin-top: 8px
}

.page-head .sub {
  max-width: 56ch;
  margin-top: 16px;
  color: var(--work-muted)
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin-top: 32px;
  padding: 0;
  list-style: none
}

.stats li {
  font: 500 .95rem var(--sans);
  color: var(--work-muted)
}

.stats strong {
  display: block;
  font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--sans);
  font-stretch: 118%;
  color: var(--work-ink);
  letter-spacing: -.02em
}

.work.on-page {
  padding-top: clamp(28px, 4vw, 48px)
}

/* Search box */
.search {
  position: relative;
  max-width: 420px;
  margin: 30px 0 4px
}

.search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 999px;
  border: 1px solid var(--tile-line);
  background: transparent;
  color: var(--work-ink);
  font: 500 1rem var(--sans)
}

.search input::placeholder {
  color: var(--work-muted)
}

.search input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--work-ink)
}

.search svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--work-muted);
  pointer-events: none
}

.search+.filters {
  margin-top: 18px
}

/* Home page: selected-work strip */
.work.strip {
  padding: clamp(48px, 7vw, 96px) 0
}

.strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px
}

.strip-head .sub {
  margin-top: 10px
}

.btn-on-dark {
  background: var(--accent);
  color: var(--on-accent)
}

.btn-on-dark:hover {
  background: var(--accent-hover)
}

.strip-foot {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px
}

.strip-foot p {
  color: var(--work-muted);
  font: 500 1rem var(--sans)
}