/* Self-hosted Inter and Hanken Grotesk (SIL Open Font License), latin and latin-ext only, so text never swaps fonts mid-load */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/hanken-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/hanken-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  Layout: a centred intro column over full-width project covers (intro layout after shivanimatlapudi.com).
  Font: Graphik is a commercial typeface, so it only applies if it is installed locally.
  Hanken Grotesk is the free stand-in. To use licensed Graphik files, add @font-face rules for
  "Graphik" (300/400/500) pointing at your own copies in /fonts.
*/

/* Colour tokens are registered so they can animate: the theme switch fades every colour together
   from the root, instead of each element fading on its own (which made text vanish mid-switch). */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #fff; }
@property --tile { syntax: "<color>"; inherits: true; initial-value: #f5f5f5; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #e6e6e6; }
@property --fg { syntax: "<color>"; inherits: true; initial-value: #303030; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: #000; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #a1a1a1; }
@property --hair { syntax: "<color>"; inherits: true; initial-value: rgba(163, 163, 163, 0.25); }
@property --underline { syntax: "<color>"; inherits: true; initial-value: rgba(0, 0, 0, 0.18); }

:root {
  /* Light theme (palette from shivanimatlapudi.com) */
  --bg: #fff;
  --tile: #f5f5f5;
  --line: #e6e6e6;
  --fg: #303030;
  --ink: #000;
  --muted: #a1a1a1;
  --hair: rgba(163, 163, 163, 0.25);
  --underline: rgba(0, 0, 0, 0.18);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
  --body: #434343;
  --gap: 6px;
  --radius: 8px;
  --sans: Graphik, "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Dark theme (toggle top right of the name row; saved in localStorage, shared with the other pages) */
html[data-theme="dark"] {
  --bg: #121212;
  --tile: #1d1d1d;
  --line: #2c2c2c;
  --fg: #cfcfcf;
  --ink: #fff;
  --muted: #8a8a8a;
  --body: #c4c4c4;
  --hair: rgba(255, 255, 255, 0.13);
  --underline: rgba(255, 255, 255, 0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { background: var(--bg); color-scheme: light; }   /* no transition on the inherited colour variables: the theme change is a View Transition reveal, and animating them would restyle every element each frame */
html[data-theme="dark"] { color-scheme: dark; }

::selection { background: var(--ink); color: var(--bg); }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }

.basic-link {
  /* anything underlined is Medium at full strength (white in dark mode) */
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: var(--underline);
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
}
.basic-link:hover { text-decoration-color: var(--fg); }

/* Light / dark toggle */

.theme {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--hair);
}
.theme__btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}
.theme__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.theme__btn:hover { color: var(--ink); }
.theme__btn[aria-pressed="true"] { color: var(--ink); }

/* The raised circle is one element that slides between the two options on a spring
   (stiffness 250, damping 17: a quick slide that overshoots a touch and settles). */
.theme__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--hair), 0 1px 3px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  transform: translateX(0);
  transition: transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
  transition-timing-function: linear(0, 0.037, 0.131, 0.261, 0.408, 0.557, 0.698, 0.823, 0.927, 1.008, 1.068, 1.107, 1.128, 1.135, 1.13, 1.118, 1.101, 1.081, 1.061, 1.042, 1.025, 1.011, 0.999, 0.991, 0.986, 0.983, 0.982, 0.982, 0.984, 0.986, 0.989, 0.992, 0.994, 0.997, 0.998, 1, 1);
}
html[data-theme="dark"] .theme__thumb { transform: translateX(24px); }

/* While the theme switches nothing may transition (the new theme is revealed by a growing circle, see the script) */
html.theme-instant,
html.theme-instant *,
html.theme-instant *::before,
html.theme-instant *::after { transition: none !important; }
html.theme-instant .theme__thumb { transition: transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) !important; }

/* View transition for the reveal: the old page stays put under the new one, which is clipped by the growing circle */
html.theme-reveal::view-transition-old(root),
html.theme-reveal::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-reveal::view-transition-old(root) { z-index: 1; }
html.theme-reveal::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  html { transition: none; }
  .theme__thumb { transition: none; }
}
.theme__btn:focus-visible { outline: 2px solid var(--muted); outline-offset: 1px; }

/* ---------- Page ---------- */

.page { padding: clamp(72px, 14vh, 140px) 20px 120px; }

/* Intro: a centred column, text left-aligned */
.intro__col {
  max-width: 600px;
  margin: 0 auto;
  /* Same body type as the case studies: Inter Medium 16, line height 200%, tracking -4%, #434343 */
  font-family: Inter, var(--sans);
  font-size: 16px;
  line-height: 200%;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--body);
}
.about__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 8px; }
.about__head h1 { font-size: inherit; line-height: inherit; font-weight: 500; letter-spacing: inherit; color: var(--ink); }
.about__role { color: var(--muted); }
.about__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.intro__col > p { padding-top: 16px; }
.intro { padding-bottom: clamp(48px, 8vw, 96px); }
.about__contact { overflow-wrap: anywhere; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.about__contact #resume { flex: none; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Pills inside the intro: same look as the pills on the covers (thin border, fully rounded) */
/* Soft rounded chip, set inline at the text's own size so it shares the paragraph's baseline */
.pill {
  display: inline;
  padding: 3px 14px;
  margin: 0 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  font-size: inherit;
  line-height: inherit;
  vertical-align: baseline;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) { a.pill:hover { background: color-mix(in srgb, var(--fg) 14%, transparent); } }

/* ---------- Project covers ---------- */

.cases { display: grid; gap: clamp(28px, 5vw, 64px); justify-items: center; }

/* The wrapper carries the rise-in, so the card itself stays free for its hover */
.case-wrap { width: min(100%, 900px); }

/* Every size inside a cover is a share of the cover's own width (cqw), so the card scales as one piece
   (measured on the 1880 x 1040 Figma card: title 72px, body 20px, label 14px, pills 16px). */
.case {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 49.36% 1fr;
  width: 100%;
  overflow: hidden;
  overflow: clip;              /* clips like hidden, but is not a scroll container, so the cover parallax tracks the page scroll */
  border-radius: 8px;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
/* The 1px stroke is its own layer on top of the clipped content. Drawn as the card's own border, it flashed black and
   white at the corners while switching theme (a rounded clip around moving, composited images). */
.case::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  pointer-events: none;
}
/* Hover (after the Awwwards cards): a dark gradient fades in over the bottom of the cover.
   No shadow around the card, no lift, no arrow. Only opacity changes. */
.case__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0) 68%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .case:hover .case__media::after, .case:focus-visible .case__media::after { opacity: 1; }
}

.case:focus-visible { outline: 2px solid var(--muted); outline-offset: 3px; }

.case__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: clamp(14px, 2cqw, 20px);
  padding: max(16px, 2.13cqw);
}
.case__media { position: relative; overflow: hidden; overflow: clip; min-width: 0; min-height: 55.32cqw; container-type: size; }
.case__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; will-change: transform; }

.case__title {
  font-size: 3.83cqw; line-height: 1.1; color: var(--ink);
  /* Figma: Neue Haas Grotesk Display Pro 55 Roman, tracking -4%. A licensed font: it shows where installed; Helvetica Neue (Apple devices) and Inter stand in elsewhere. */
  font-family: "Neue Haas Grotesk Display Pro", "Neue Haas Grotesk Display", "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
  font-weight: 400; letter-spacing: -0.04em;
}
.case__meta {
  display: flex; justify-content: space-between;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.case__meta dt, .case__label {
  font-size: max(11px, 1.15cqw); line-height: 1; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted);
}
.case__meta dd { margin: 8px 0 0; font-size: max(15px, 1.7cqw); line-height: 1.2; letter-spacing: -0.02em; }
.case__problem > p {
  font-size: 14px; line-height: 1.5; font-weight: 400; letter-spacing: -0.02em; color: var(--fg);
}
/* A link inside the description text (the cover itself is already a link, so it is a span that opens in a new tab) */
.case__inline { cursor: pointer; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: var(--underline); transition: text-decoration-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .case__inline:hover { text-decoration-color: var(--ink); } }
.case__inline:focus-visible { outline: 2px solid var(--muted); outline-offset: 2px; border-radius: 2px; }
/* The arrow is as big as the text and rides on its baseline */
.case__problem .case__live {
  display: inline-flex; align-items: center; gap: 0.3em; margin-top: 14px; cursor: pointer;
  font-size: 14px; line-height: 1.2; letter-spacing: 0; font-weight: 500; color: var(--ink);
}
.case__problem .case__live + .case__live { margin-left: 20px; }
.case__problem .case__live span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: var(--underline); transition: text-decoration-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .case__problem .case__live:hover span { text-decoration-color: var(--ink); } .case__problem .case__live:hover .case__live-arrow { transform: translate(1.5px, -1.5px); } }
.case__live-arrow { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .case__skills .case__live:hover .case__live-arrow { transform: translate(1.5px, -1.5px); } }
.case__skills .case__live span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: var(--underline); transition: text-decoration-color 0.15s ease; }
@media (hover: hover) and (pointer: fine) { .case__skills .case__live:hover span { text-decoration-color: var(--fg); } }

/* "Email copied" pill above the pointer after clicking Email */
.copy-toast {
  position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)) scale(0.96); transform-origin: 50% 100%;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; line-height: 1.2; letter-spacing: -0.01em; background: var(--fg); color: var(--bg);
  opacity: 0; transition: opacity 0.15s ease, transform 0.2s var(--ease-out);
}
.copy-toast.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 14px)); }
@media (prefers-reduced-motion: reduce) { .copy-toast { transition: opacity 0.15s ease; transform: translate(-50%, calc(-100% - 14px)); } }

/* A cover with no page yet: a "Coming soon" pill follows the pointer over it (not over its own links) */
.case[data-soon] { cursor: default; }
.soon-cursor {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 13px; line-height: 1.2; letter-spacing: -0.01em;
  background: var(--fg); color: var(--bg);
  opacity: 0; transition: opacity 0.15s ease;
  will-change: transform;
}
.soon-cursor.is-on { opacity: 1; }

/* Hunbun: the prototype video plays over the cover while the pointer is on the card */
.case__video { will-change: transform; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 250ms var(--ease-out); pointer-events: none; }
.case__video.is-playing { opacity: 1; }
/* Hunbun cover: the real prototype, playing a hands-off tour, sits exactly over the phone in the cover image
   (the phone is x 277-739, y 121-1091 of the 1000 x 1092 cover). Not interactive, so clicks fall through to the card. */
.case__demo iframe {
  position: absolute; left: 27.7%; top: 11.08%; width: 46.2%; height: 88.83%;
  border: 0; background: transparent; pointer-events: none;
  color-scheme: normal;
  /* the frame is clipped to the phone's own outline (outer corner radius 70 of 417 units wide = 3.93cqw), so its corners are
     always see-through, whatever backdrop the browser gives an embedded page */
  border-radius: 3.93cqw;
}

/* Kotak Securities cover: an upright phone (drawn in the cover image, screen at x 293-707, y 105-987 of 1000 x 1092) with the prototype
   playing on its screen. The prototype page is 390 x 831 and is scaled to fill the 414 x 882 screen; --k (motion.js) is card width / 1000. */
.case__demo--phone iframe {
  left: calc(293px * var(--k, 0.5)); top: calc(105px * var(--k, 0.5)); width: 390px; height: 831px;
  border-radius: 0; transform-origin: 0 0; transform: scale(calc(var(--k, 0.5) * 1.06154)); clip-path: inset(0 round 55px);
}
/* Tradl AI cover: the Smart Chain prototype is laid out for a 393px-wide phone, so it gets that width (scaled to the 414 screen) */
.case__demo--tradl iframe { width: 393px; height: 837px; transform: scale(calc(var(--k, 0.5) * 1.05344)); }

/* Hamster Garage and Klearmind only: the arrow on the cover opens the live site, and so does the "Live website" link after the pills */
.case__skills .case__live {
  display: inline-flex; align-items: center; gap: 0.3em;
  padding: 0; border: 0; border-radius: 0; margin-left: 4px; cursor: pointer; align-self: center;
  font-size: 14px; line-height: 1.2; letter-spacing: 0; font-weight: 500; color: var(--ink);
}
.case__live:focus-visible { outline: 2px solid var(--muted); outline-offset: 3px; border-radius: 4px; }
.case__skills {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: auto;
}
.case__skills li {
  padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: max(10px, 1.09cqw); line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap;
}

/* Match the cover's object-fit crop when the text makes a split card taller. */
.case__demo {
  --demo-width: max(100cqw, 100cqh * 952 / 1040);
  width: var(--demo-width);
  left: calc((100% - var(--demo-width)) / 2);
  right: auto;
}
.case__demo:not(.case__demo--phone) iframe {
  border-radius: max(7.76cqw, 7.1cqh);
}
.case--outcomes .case__title { font-weight: 300; }
.case--outcomes .case__meta { padding: 0; border: 0; }
.case--outcomes .case__skills { margin-top: 0; }
.case__outcomes {
  display: grid;
  gap: clamp(14px, 2cqw, 20px);
  margin-top: auto;
}
.case__outcomes .case__label { color: var(--body); }
.case__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 8px;
}
.case__metrics > :only-child { grid-column: 1 / -1; }
.case__metrics dt, .case__award {
  font-size: clamp(18px, 2.7cqw, 25px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.case__metrics dd {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--body);
}

/* ---------- Motion (ported from rakshitafolio.com; only when motion.js flags the page) ---------- */

/* Rise-in: transform + opacity only, strong ease-out, ~70ms stagger, once. Slower than UI chrome on purpose:
   it plays once per visit (first-visit tier). Under reduced motion it becomes a plain fade. */
html.motion [data-reveal] { opacity: 0; transform: translate3d(0, var(--rise, 40px), 0); }
html.motion .case-wrap[data-reveal] { --rise: 64px; }
html.motion [data-reveal][data-from="top"] { --rise: -24px; }
html.motion [data-reveal].in {
  opacity: 1;
  transform: none;
  transition: opacity 400ms var(--ease-out) var(--d, 0s), transform 800ms var(--ease-out) var(--d, 0s);
}
html.reduce [data-reveal] { transform: none; }
html.reduce [data-reveal].in { transition: opacity 300ms ease var(--d, 0s); }
html.motion:not(.reduce) .case__img, html.motion:not(.reduce) .case__video { transform: scale(1.14); }
/* Parallax driven by scroll on the compositor: each cover image drifts from -7% to +7% of its height while its card
   crosses the viewport (the same curve as the JS fallback in motion.js). The timeline belongs to the unmoving media box. */
@supports (animation-timeline: view()) {
  html.motion:not(.reduce) .case__media { view-timeline-name: --cover; }
  html.motion:not(.reduce) .case__img,
  html.motion:not(.reduce) .case__video { animation: cover-drift linear both; animation-timeline: --cover; animation-range: cover 0% cover 100%; }
  @keyframes cover-drift {
    from { transform: translate3d(0, -7%, 0) scale(1.14); }
    to   { transform: translate3d(0, 7%, 0) scale(1.14); }
  }
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Phones: cover on top, text under it, in fixed sizes */
@media (max-width: 640px) {
  .case { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .case__media { order: -1; aspect-ratio: 952 / 1040; }
  .case__text { gap: 16px; padding: 20px; }
  .case__title { font-size: 32px; }
  .case__meta { padding-bottom: 16px; }
  .case__meta dt, .case__label { font-size: 11px; }
  .case__meta dd { font-size: 14px; margin-top: 6px; }
  .case__skills { gap: 8px; }
  .case__skills li { font-size: 11px; padding: 4px 10px; }
}

@media (prefers-reduced-motion: reduce) { .case__live-arrow { transform: none !important; transition: none; } }

/* No widows or ragged last lines in running text */
.intro__col > p, .case__problem p { text-wrap: pretty; }

