/* Base */
:root {
  --background: #fafafa;
  --foreground: #171717;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Geist", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

.mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }

a { color: inherit; text-decoration: none; }

.skip-link { position: absolute; left: -9999px; }

/* Layout */
.view-container { width: 100%; max-width: 640px; margin: 0 auto; padding: 16px 16px 0; }

section { padding: 24px 0; }

.section-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }

.section-title {
  color: var(--foreground);
  font-family: "Figtree", "Geist", Inter, sans-serif;
  font-size: 22px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -.01em;
}

/* About */
#about { padding-top: 28px; }
.about-head { display: flex; flex-direction: column; align-items: center; gap: 38px; margin-bottom: 18px; text-align: center; }
.about-avatar { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }
.about-head h1 { font-size: 36px; font-weight: 600; letter-spacing: -.02em; text-align: center; }
.name-heading { font-family: "Instrument Serif", "Figtree", Georgia, serif; font-style: italic; font-weight: 400; }

/* Hero logo web */
.logo-web { position: relative; width: 100%; height: 260px; display: grid; place-items: center; }
.web-logo { position: absolute; height: 26px; max-width: 68px; object-fit: contain; filter: grayscale(1); opacity: .42; transition: opacity .3s ease, filter .3s ease; animation: web-float 7s ease-in-out infinite; }
.web-logo:hover { filter: grayscale(0); opacity: .9; }
.about-avatar { position: relative; z-index: 1; box-shadow: 0 0 0 8px #fafafa; }
/* Top band above the avatar */
.wl-1 { top: 4%; left: 4%; }
.wl-2 { top: 11%; left: 16%; }
.wl-3 { top: 3%; left: 27%; }
.wl-4 { top: 9%; left: 32%; }
.wl-5 { top: 11%; left: 66%; }
.wl-6 { top: 3%; left: 74%; }
.wl-7 { top: 10%; left: 85%; }
.wl-8 { top: 5%; left: 95%; }
/* Right side column */
.wl-9 { top: 28%; left: 97%; }
.wl-10 { top: 44%; left: 89%; }
.wl-11 { top: 60%; left: 70%; }
.wl-12 { top: 76%; left: 94%; }
/* Bottom band below the avatar */
.wl-13 { top: 90%; left: 95%; }
.wl-14 { top: 95%; left: 85%; }
.wl-15 { top: 89%; left: 74%; }
.wl-16 { top: 94%; left: 62%; }
.wl-17 { top: 91%; left: 51%; }
.wl-18 { top: 95%; left: 38%; }
.wl-19 { top: 89%; left: 28%; }
.wl-20 { top: 94%; left: 16%; }
/* Left side column */
.wl-21 { top: 76%; left: 6%; }
.wl-22 { top: 60%; left: 30%; }
.wl-23 { top: 44%; left: 12%; }
.wl-24 { top: 28%; left: 3%; height: 22px; }
/* Expanded ring: fill gaps left by the original 24 */
.wl-25 { top: 15%; left: 24%; }
.wl-26 { top: 14%; left: 74%; }
.wl-27 { top: 22%; left: 8%; }
.wl-28 { top: 22%; left: 90%; }
.wl-29 { top: 36%; left: 17%; }
.wl-30 { top: 36%; left: 81%; }
.wl-31 { top: 50%; left: 22%; }
.wl-32 { top: 50%; left: 76%; }
.wl-33 { top: 66%; left: 18%; }
.logo-web img:nth-of-type(3n) { animation-delay: -2.2s; }
.logo-web img:nth-of-type(3n+1) { animation-delay: -4.4s; }
.logo-web img:nth-of-type(3n+2) { animation-delay: -5.8s; }
@keyframes web-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .web-logo { animation: none; } }

/* Flags flight bar (replaces navbar) */
.flags-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 720px; margin: 0 auto 8px; padding: 2px 4px 0; }
.flag { font-size: 22px; line-height: 1; cursor: default; }
.flag-tip { position: relative; }
.flag-tip::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-2px); background: #171717; color: #fff; font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 20; }
.flag-tip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.flight-path { flex: 1; position: relative; height: 22px; }
.trail { position: absolute; left: 0; top: 50%; height: 0; width: var(--trail-w, 0%); border-top: 1.5px dotted #b8b8b8; transform: translateY(-.75px); }
.plane { position: absolute; top: 50%; left: 0; font-size: 15px; line-height: 1; transform: translateY(-50%); animation: plane-fly 9s linear infinite; }
@keyframes plane-fly { 0% { left: 0; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { left: calc(100% - 15px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .plane { animation: none; left: 50%; } .trail { width: 50%; } }
.scroll-hint { display: none; }
.scroll-hint.gone { opacity: 0 !important; pointer-events: none; transition: opacity .3s ease; }
.about-copy { color: #404040; font-size: 15px; margin-bottom: 12px; max-width: 60ch; }
.about-copy { margin-left: auto; margin-right: auto; text-align: center; }
.about-copy a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.about-copy a:hover { color: #000; }

.about-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 4px; }
.social-button { width: 46px; height: 46px; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--ink, #171717); box-shadow: 0 2px 8px rgba(0,0,0,.04); font-size: 21px; transition: transform .2s ease, box-shadow .2s ease; }
.social-button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.social-gmail { color: #ea4335; }
.social-linkedin { color: #0a66c2; }
.social-x { color: #000; }
.social-github { color: #24292f; }
.button-resume { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; background: #171717; color: #fff; border-radius: 12px; font-size: 14px; font-weight: 500; transition: transform .2s ease, background .2s ease; }
.button-resume:hover { background: #000; transform: translateY(-2px); }

/* Hero marquees */
.hero-marquee { width: 100%; overflow: hidden; margin-top: 26px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hero-marquee-track { display: flex; width: max-content; animation: hero-marquee 32s linear infinite; }
.client-marquee .hero-marquee-track { animation-duration: 42s; animation-direction: reverse; }
.hero-marquee:hover .hero-marquee-track { animation-play-state: paused; }
.hero-marquee-set { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.hero-marquee-set img { height: 26px; max-width: 92px; object-fit: contain; opacity: .85; transition: opacity .25s ease; }
.client-marquee { margin-top: 14px; padding-bottom: 2px; }
.client-marquee .hero-marquee-set img { height: 22px; max-width: 84px; opacity: .8; }
.hero-marquee-track { transition: opacity .25s ease; }
@keyframes hero-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .hero-marquee-track { animation: none; } }

/* Divider lists */
.list { display: grid; border-top: 1px solid var(--border); }

.row { padding: 18px 0; border-bottom: 1px solid var(--border); transition: opacity .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .list:hover .row:not(:hover) { opacity: .4; }
  .list:hover .row:hover { opacity: 1; }
}

.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.row-head > div { flex: 1; }
.row-head h3 { font-size: 16px; font-weight: 500; letter-spacing: -.01em; }
.row-head h3 a { color: inherit; text-decoration: none; position: relative; }
.row-head h3 a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--foreground); transition: width .25s ease; }
.row-head h3 a:hover::after { width: 100%; }
.row-head h3 a i { font-size: 13px; margin-left: 2px; }
.row-logo { flex-shrink: 0; width: 46px; height: 46px; object-fit: contain; padding: 7px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.03); }
.row-logo-dark { background: #111114; border-color: #111114; }
.row-head > .row-links { display: flex; flex: 0 0 auto; gap: 14px; margin-left: auto; padding-left: 16px; }
.row-links a { display: inline-flex; align-items: center; gap: 3px; color: var(--muted-foreground); font-size: 12.5px; transition: color .2s ease; position: relative; }
.row-links a:hover { color: var(--foreground); }
.row-links a i { font-size: 13px; }
.row > p { color: var(--muted-foreground); font-size: 14px; margin-top: 4px; }
.at { display: flex; align-items: center; gap: 5px; color: var(--muted-foreground); font-size: 14px; margin-top: 2px; }
.at + .at { margin-top: 5px; }
.at a { display: inline-flex; align-items: center; gap: 2px; color: var(--foreground); position: relative; }
.at a::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 0; height: 1px; background: var(--foreground); transition: width .25s ease; }
.at a:hover::after { width: 100%; }
.at i { font-size: 14px; }
/* .loc retained for compatibility; locations now render on their own line in experience rows */
.dates { flex-shrink: 0; color: var(--muted-foreground); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.stack { color: var(--muted-foreground); font-size: 12px; line-height: 1.7; margin-top: 14px; }

/* Expandable experience rows */
.row-toggle { width: 100%; display: flex; align-items: flex-start; gap: 16px; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.toggle-icon { flex-shrink: 0; margin-top: 3px; color: var(--muted-foreground); font-size: 17px; transition: transform .25s ease; }
.row-toggle > div { flex: 1; }
.row-toggle .dates { margin-left: auto; margin-right: 8px; padding-top: 3px; }
.exp-row.open .toggle-icon { transform: rotate(180deg); }
.row-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.row-detail-inner { min-height: 0; overflow: hidden; }
.exp-row.open .row-detail { grid-template-rows: 1fr; }
.row-detail-inner > :first-child { margin-top: 12px; }
.row-summary { color: var(--muted-foreground); font-size: 14px; line-height: 1.6; }
.progression { margin-top: 22px; list-style: none; }
.progression li { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px dashed var(--border); font-size: 13.5px; }
.progression li:first-child { border-top: 0; }
.progression strong { font-weight: 500; }
.progression span { color: var(--muted-foreground); font-size: 12.5px; text-align: right; }
.progression + .skills { margin-top: 12px; }

/* Journey collage */
.experience-gallery { margin-top: 20px; }
/* Collage */
.experience-gallery-grid { position: relative; width: 100%; height: 390px; overflow: hidden; background: linear-gradient(145deg, #f8f8f6, #eeeeeb); border: 1px solid var(--border); border-radius: 18px; }
.experience-gallery figure { position: absolute; min-width: 0; margin: 0; overflow: hidden; background: white; border: 8px solid white; border-radius: 10px; box-shadow: 0 14px 32px rgba(0,0,0,.08); cursor: zoom-in; outline: none; transition: inset .3s ease, left .3s ease, top .3s ease, width .3s ease, height .3s ease, transform .3s ease, box-shadow .3s ease; }
.experience-gallery figure:focus-visible { box-shadow: 0 0 0 4px rgba(23,23,23,.15), 0 0 0 6px #171717; }
.experience-gallery img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: filter .25s ease, transform .35s ease; }
.experience-gallery figure:focus-visible,
.experience-gallery figure.is-color { z-index: 50; background: transparent; border-width: 0; border-radius: 5px; cursor: zoom-out; box-shadow: 0 22px 56px rgba(0,0,0,.22); transform: scale(1.28); }
.experience-gallery figure:focus-visible img,
.experience-gallery figure.is-color img { object-fit: contain; filter: grayscale(0) contrast(1) saturate(1.03); transform: none; }
.gallery-lunch { top: 21%; left: 25%; z-index: 8; width: 50%; height: 56%; transform: rotate(-.5deg); }
.gallery-lunch img { object-position: 50% 46%; }
.gallery-india { top: 2%; left: 1%; z-index: 2; width: 26%; height: 30%; transform: rotate(-2deg); }
.gallery-india img { object-position: 58% 34%; }
.gallery-holi { top: 1%; left: 20%; z-index: 3; width: 22%; height: 27%; transform: rotate(1.5deg); }
.gallery-holi img { object-position: 50% 38%; }
.gallery-coats { top: 1%; left: 79%; z-index: 2; width: 19%; height: 36%; transform: rotate(2deg); }
.gallery-coats img { object-position: 50% 20%; }
.gallery-cake { top: 63%; left: 75%; z-index: 4; width: 24%; height: 31%; transform: rotate(-2deg); }
.gallery-cake img { object-position: 58% 44%; }
.gallery-selfie { top: 34%; left: 1%; z-index: 4; width: 20%; height: 34%; transform: rotate(2deg); }
.gallery-selfie img { object-position: 50% 24%; }
.gallery-team { top: 67%; left: 2%; z-index: 3; width: 25%; height: 31%; transform: rotate(-1deg); }
.gallery-team img { object-position: 53% 27%; }
.gallery-office { top: 1%; left: 40%; z-index: 4; width: 22%; height: 27%; transform: rotate(-1deg); }
.gallery-office img { object-position: 50% 60%; }
.gallery-holiday { top: 72%; left: 38%; z-index: 5; width: 28%; height: 27%; transform: rotate(1deg); }
.gallery-holiday img { object-position: 48% 35%; }
.gallery-evening-team { top: 33%; left: 78%; z-index: 3; width: 21%; height: 33%; transform: rotate(-1deg); }
.gallery-evening-team img { object-position: 18% 42%; }
.gallery-dinner-home { top: 62%; left: 18%; z-index: 6; width: 28%; height: 32%; transform: rotate(2deg); }
.gallery-dinner-home img { object-position: 58% 48%; }
.gallery-restaurant { top: 68%; left: 59%; z-index: 7; width: 22%; height: 29%; transform: rotate(-2deg); }
.gallery-restaurant img { object-position: 64% 45%; }

@media (hover: hover) {
  .experience-gallery figure:hover { z-index: 50; background: transparent; border-width: 0; border-radius: 5px; cursor: zoom-out; box-shadow: 0 22px 56px rgba(0,0,0,.22); transform: scale(1.28); }
  .experience-gallery figure:hover img { object-fit: contain; filter: grayscale(0) contrast(1) saturate(1.03); transform: none; }
}

/* Off the clock */
.off-clock-section { padding: 24px 0 0; }
.off-clock-title { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.off-clock-title { color: var(--foreground); font-family: "Figtree", "Geist", Inter, sans-serif; font-size: 22px; font-style: normal; font-weight: 600; letter-spacing: -.01em; }
.off-clock-copy { width: 100%; margin-top: 8px; color: var(--muted-foreground); font-size: 14px; line-height: 1.6; }
.off-clock-link { display: grid; width: max-content; place-items: center; margin: 18px auto 0; padding: 0; background: none; border: 0; cursor: pointer; transition: transform .2s ease, opacity .2s ease; }
.off-clock-link:hover { transform: translateY(-2px); }
.off-clock-link:focus-visible { outline: none; border-radius: 12px; box-shadow: 0 0 0 4px rgba(23,23,23,.15), 0 0 0 6px #171717; }
.off-clock-icons { display: grid; grid-template-columns: 44px 16px 44px; align-items: center; justify-content: center; gap: 9px; }
.beat-apple-logo { width: 44px; height: 44px; border-radius: 11px; object-fit: cover; }
.beat-plus { color: #55525c; font-size: 20px; font-weight: 700; line-height: 1; text-align: center; }
.beat-letterboxd-logo { display: grid; width: 44px; height: 44px; place-items: center; overflow: hidden; border-radius: 50%; }
.beat-letterboxd-logo img { width: 44px; height: 44px; object-fit: contain; }

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 640px;
  margin: 24px auto 0;
  padding: 18px 16px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 12.5px;
}

/* Beat dialog */
.beat-dialog { margin: auto; }
.beat-dialog { width: min(880px, calc(100% - 32px)); height: min(640px, calc(100dvh - 48px)); max-height: calc(100dvh - 32px); padding: 0; color: var(--foreground); background: var(--background); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 34px 90px rgba(20,18,14,.36); }
.beat-dialog::backdrop { background: rgba(20,20,18,.62); backdrop-filter: blur(10px); }
.beat-dialog-panel { height: 100%; padding: 14px; }
.beat-dialog-close { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; width: 36px; height: 36px; place-items: center; color: rgba(255,255,255,.9); background: rgba(20,20,20,.52); border: 1px solid rgba(255,255,255,.2); border-radius: 50%; backdrop-filter: blur(8px); font-size: 18px; cursor: pointer; }
.beat-dialog-frame { position: relative; width: 100%; height: 100%; border-radius: 14px; overflow: hidden; background: #f0f0f0; }
.beat-dialog-loading { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: #171717; border-radius: 50%; animation: beat-spin .8s linear infinite; }
.beat-dialog-iframe { position: relative; z-index: 1; width: 100%; height: 100%; border: 0; }
@keyframes beat-spin { to { transform: rotate(360deg); } }

/* Reveal animation */
html.js .reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1); }
  html.js .reveal.in { opacity: 1; transform: none; }
}

/* Intro: greeting overlay, then page fade */
.greeting-overlay { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: #fafafa; }
.greeting-overlay.fading { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.greeting-text { color: #171717; font-family: "Figtree", "Geist", Inter, sans-serif; font-size: 20px; font-weight: 600; letter-spacing: -.01em; opacity: 0; }
.greeting-text.visible { opacity: 1; transition: opacity .14s ease; }
.greeting-text.hidden { opacity: 0; transition: opacity .14s ease; }

html.intro-active .greeting-overlay ~ a.skip-link,
html.intro-active main { opacity: 0; }
main { transition: opacity .6s ease; }
html.intro-done main { transition: opacity .35s ease; }
html.intro-done main { opacity: 1; }

/* Responsive */
@media (max-width: 640px) {
  .site-nav { padding: 16px 16px 10px; }
  .scroll-hint { display: grid; place-items: center; width: 40px; height: 40px; margin: 16px auto 0; padding: 0; background: none; border: 0; color: #525252; cursor: pointer; animation: scroll-hint-bounce 2.2s ease-in-out infinite; }
  .scroll-hint svg { width: 26px; height: 26px; display: block; }
  @keyframes scroll-hint-bounce { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(6px); opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }
  .site-nav nav { gap: 14px; }
  .site-nav nav a { font-size: 13.5px; }
  .view-container { padding-top: 28px; }
  .logo-web { height: 220px; }
  .web-logo { height: 20px; max-width: 52px; opacity: .36; }
  .wl-24 { height: 17px; }
  .row-head { flex-wrap: wrap; row-gap: 6px; }
  .row-head .dates { flex-basis: calc(100% - 62px); margin-left: 62px; font-size: 12.5px; }
  .row-toggle { position: relative; flex-wrap: wrap; row-gap: 8px; padding-right: 24px; }
  .row-toggle > div { min-width: 0; }
  .toggle-icon { position: absolute; top: 4px; right: 0; margin: 0; }
  .row-toggle .dates { flex-basis: calc(100% - 62px); margin-left: 62px; margin-right: 0; padding-top: 0; font-size: 12.5px; }
  .about-actions .button-resume { flex: 1; justify-content: center; }
  .progression li { flex-direction: column; gap: 2px; }
  .progression span { text-align: left; }
  @supports (display: flex) {
    .progression li { flex-direction: row; align-items: baseline; }
    .progression strong { flex: 1; }
    .progression span { flex-shrink: 0; margin-left: 16px; }
  }
  .experience-gallery-grid { width: 100%; height: 414px; }
  .gallery-lunch { top: 28%; left: 8%; width: 84%; height: 40%; }
  .gallery-india { top: 0; left: 0; width: 47%; height: 24%; }
  .gallery-holi { top: 1%; left: 38%; width: 44%; height: 22%; }
  .gallery-coats { top: 10%; left: 73%; width: 27%; height: 25%; }
  .gallery-cake { top: 70%; left: 68%; width: 32%; height: 20%; }
  .gallery-selfie { top: 23%; left: 0; width: 31%; height: 25%; }
  .gallery-team { top: 77%; left: 0; width: 42%; height: 21%; }
  .gallery-office { top: 79%; left: 43%; width: 40%; height: 19%; }
  .gallery-holiday { top: 58%; left: 25%; width: 45%; height: 22%; }
  .gallery-evening-team { top: 38%; left: 72%; width: 28%; height: 25%; }
  .gallery-dinner-home { top: 52%; left: 0; width: 39%; height: 25%; }
  .gallery-restaurant { top: 57%; left: 55%; width: 43%; height: 21%; }
}
