/* Bagicha design language: cream paper, ink, painterly flowers.
   Type system — three families, each with one job:
     Display   Bricolage Grotesque 600, large    → page + section titles, big numbers
     Heading   Bricolage Grotesque 500 / 600     → item titles (h3–h5), manifesto, nav logo
     Paragraph DM Sans 400 / 500 / 600               → body copy, and labels (500, 13px, sentence case)
   Emphasis is colour (--accent-text), never a font switch or a slanted style.
   Everything is written in sentence case. No all-caps labels, no decorative glyphs.
   The only exception is the home wordmark SRIJAN: Cormorant Garamond with a Pinyon Script swash J. */
:root {
  --radius: 20px;
  --radius-sm: 14px;
  --paper: #FBF8F2;
  --paper-2: #F2EFE8;
  --ink: #1C1A17;
  --ink-2: #4A463F;
  --muted: #8B857A;
  --faint: #B8B2A6;
  --line: #E6E0D4;
  --leaf: #3E7B3A;
  --marigold: #F28C1B;
  --accent-text: #A9520A; /* marigold deep enough for text: AA on every surface */
  --rani: #E6007E;
  --tint-marigold: #F3E8DA;
  --tint-rani: #F1E3E2;
  --tint-leaf: #E4E9DF;
  --tint-haldi: #F2EBD8;
  --display: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif; /* titles: same family as headings, bigger and heavier */
  --wordmark: 'Cormorant Garamond', Georgia, serif; /* home SRIJAN only */
  --heading: 'Bricolage Grotesque', 'DM Sans', system-ui, sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --wordmark-swash: 'Pinyon Script', 'Cormorant Garamond', serif; /* home wordmark only */
  /* Type scale */
  --t-display-xl: clamp(56px, 10vw, 148px);  /* page titles */
  --t-display-l: clamp(48px, 7.4vw, 104px);  /* contact title, stats */
  --t-display-m: clamp(40px, 5.4vw, 72px);   /* section titles, case-study titles */
  --t-display-s: clamp(30px, 3.4vw, 46px);   /* link words */
  --t-heading-xl: clamp(28px, 4vw, 54px);    /* manifesto */
  --t-heading-l: clamp(24px, 2.4vw, 32px);   /* project / role titles */
  --t-heading-m: 20px;                       /* card titles */
  --t-heading-s: 16px;                       /* small titles */
  --t-body-l: clamp(17px, 1.5vw, 19px);      /* lead */
  --t-body-m: 16px;                          /* paragraph */
  --t-body-s: 14px;                          /* small paragraph */
  --t-label: 13px;                           /* labels, sentence case */
  --gutter: 28px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--t-body-m); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, li, dd, a { overflow-wrap: break-word; }
h1, h2, h3, h4, h5 { font-family: var(--heading); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
[hidden] { display: none !important; }
::selection { background: #A9C8F5; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 18px var(--gutter); font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; border-bottom: 1px solid transparent; transition: background .3s ease, border-color .3s ease; }
.nav.is-solid { background: rgba(251, 248, 242, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom-color: var(--line); }
.nav .mark { font-family: var(--heading); font-weight: 600; font-size: var(--t-heading-s); letter-spacing: -.02em; text-transform: none; }
.nav ul a:hover { color: var(--ink); }
.nav ul { display: flex; gap: 28px; list-style: none; color: var(--ink-2); }
.nav ul a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.nav .cta { justify-self: end; }
.nav .menu { border-radius: 999px; display: none; justify-self: end; font: inherit; background: none; border: 1px solid var(--ink); padding: 6px 10px; cursor: pointer; letter-spacing: 0; }

/* ---------- Headings & labels ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; }
section { position: relative; padding: 130px var(--gutter); }
.tag { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; display: inline-flex; gap: 8px; align-items: center; }
.eyebrow { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.eyebrow a { font: 500 var(--t-label)/1.4 var(--body); color: var(--ink-2); border-bottom: 1px solid currentColor; }
.eyebrow a:hover { color: var(--accent-text); }
.eyebrow b { font: 600 var(--t-display-m)/1.05 var(--display); color: var(--ink); letter-spacing: -.025em; }
.h2 { font-family: var(--display); font-weight: 600; font-size: var(--t-display-l); line-height: 1; letter-spacing: -.025em; }
.right { text-align: right; }
.lead { font-size: var(--t-body-l); line-height: 1.6; color: var(--ink-2); max-width: 58ch; }
.big { font-family: var(--heading); font-weight: 500; font-size: var(--t-heading-xl); line-height: 1.06; letter-spacing: -.025em; }
.big em, .lead em, .mid em { font-style: normal; color: var(--accent-text); }
.mid { font-family: var(--heading); font-weight: 500; font-size: var(--t-heading-xl); line-height: 1.1; letter-spacing: -.025em; }
.fill-w { opacity: .14; transition: opacity .35s ease; }
.fill-w.is-lit { opacity: 1; }
.more { display: inline-flex; gap: 8px; align-items: center; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.more:hover { color: var(--marigold); }
body.show-drafts .draft { display: block; }
[data-draft-section] { display: none !important; }
body.show-drafts [data-draft-section] { display: block !important; outline: 1px dashed var(--accent-text); outline-offset: 8px; }
.draft { display: none; margin-top: 10px; font: 500 var(--t-label)/1.4 var(--body); color: var(--accent-text); background: var(--tint-marigold); padding: 6px 10px; border-radius: 8px; width: fit-content; }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Gardens (home hero + page headers) ---------- */
[data-garden] { position: relative; overflow: hidden; cursor: crosshair; touch-action: pan-y; }
[data-garden] > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero { height: 100vh; height: 100svh; min-height: 420px; }
.hero .wordmark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.hero h1 { text-shadow: 0 0 28px var(--paper), 0 0 10px var(--paper); font-family: var(--wordmark); font-weight: 500; font-size: clamp(64px, min(15vw, 26vh), 230px); letter-spacing: .02em; line-height: 1; }
.hero h1 .sw { font-family: var(--wordmark-swash); font-weight: 400; font-size: .92em; margin-right: .02em; position: relative; top: -.02em; }
.hero .wordmark p { margin-top: clamp(26px, 6vh, 56px); font: 500 var(--t-heading-l)/1.2 var(--heading); letter-spacing: -.02em; color: var(--ink); text-shadow: 0 0 18px var(--paper), 0 0 6px var(--paper); }
.corner { position: absolute; left: var(--gutter); bottom: 22px; z-index: 5; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; line-height: 1.5; letter-spacing: 0; pointer-events: none; }
.hint { position: absolute; right: var(--gutter); bottom: 22px; z-index: 5; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); display: flex; gap: 14px; align-items: center; }
.hint > span { text-shadow: 0 0 10px var(--paper), 0 0 4px var(--paper); }
.hint button { border-radius: 999px; font: inherit; color: var(--ink); background: rgba(251, 248, 242, .8); border: 1px solid var(--line); padding: 6px 10px; cursor: pointer; letter-spacing: 0; }
.hint button:hover { border-color: var(--ink); }

.page-head { height: 72vh; min-height: 460px; max-height: 760px; border-bottom: 1px solid var(--line); }
.page-head .inner { position: absolute; left: var(--gutter); right: var(--gutter); top: 120px; pointer-events: none; max-width: var(--wrap); margin: 0 auto; }
.page-head .num { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.page-head h1 { width: fit-content; font-family: var(--display); font-weight: 600; font-size: var(--t-display-xl); line-height: .95; letter-spacing: -.025em; margin: 14px 0 22px; }
.page-head .lead { color: var(--ink); background: rgba(251, 248, 242, .72); display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 2px 4px; line-height: 1.7; }

/* ---------- Marquee ---------- */

/* ---------- Work: hover-to-expand cards ---------- */
.tabs { display: flex; margin: 0 0 24px; }
.tabs button:first-child { border-radius: 999px 0 0 999px; }
.tabs button:last-child { border-radius: 0 999px 999px 0; }
.tabs button { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; padding: 8px 14px; border: 1px solid var(--ink); background: transparent; cursor: pointer; margin-right: -1px; color: var(--ink); }
.tabs button.is-active { background: var(--ink); color: var(--paper); }
.wgrid { display: grid; gap: 14px; }
.wrow { display: flex; gap: 14px; min-height: 300px; }
.wcard { position: relative; border-radius: var(--radius); flex: 1 1 0; min-width: 0; display: flex; gap: 18px; padding: 22px; background: var(--tint); overflow: hidden; transition: flex-grow .7s var(--ease), background .4s ease; }
.wcard .txt { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 200px; }
.wcard .n { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.wcard h3 { margin-top: 10px; font-weight: 600; font-size: var(--t-heading-l); line-height: 1.1; }
.wcard h3 em { font-style: normal; font-weight: 500; color: var(--ink-2); }
.wcard .desc { margin-top: 12px; font-size: var(--t-body-s); line-height: 1.55; color: var(--ink-2); max-width: 40ch; opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .5s var(--ease); }
.wcard .foot { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; }
.wcard .arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(28, 26, 23, .25); display: grid; place-items: center; font-size: var(--t-body-s); transition: background .3s ease, color .3s ease, transform .4s var(--ease), border-color .3s; }
.wcard .shot { border-radius: var(--radius-sm); flex: 0 0 0; opacity: 0; overflow: hidden; display: grid; place-items: center; background: var(--cover); transition: flex-basis .7s var(--ease), opacity .4s ease; }
.wcard .shot span { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; background: rgba(255, 255, 255, .85); padding: 5px 9px; white-space: nowrap; }
.wrow:hover .wcard { flex-grow: .75; }
.wrow .wcard:hover, .wrow .wcard:focus-visible { flex-grow: 2.3; }
.wcard:hover .desc, .wcard:focus-visible .desc { opacity: 1; transform: none; }
.wcard:hover .shot, .wcard:focus-visible .shot { flex-basis: 46%; opacity: 1; }
.wcard:hover .arrow, .wcard:focus-visible .arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: rotate(-45deg); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.chips span { font: 500 var(--t-label)/1.4 var(--body); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.c-marigold { --tint: var(--tint-marigold); --cover: linear-gradient(150deg, #E9D6BF 0%, #C9A27A 55%, #8E6A4A 100%); }
.c-rani { --tint: var(--tint-rani); --cover: linear-gradient(150deg, #E8D3D1 0%, #C29A9C 55%, #85626A 100%); }
.c-leaf { --tint: var(--tint-leaf); --cover: linear-gradient(150deg, #DCE3D5 0%, #A8B69F 55%, #6E7E68 100%); }
.c-haldi { --tint: var(--tint-haldi); --cover: linear-gradient(150deg, #EDE2C6 0%, #CDB585 55%, #8F7A4E 100%); }

/* Full project rows (work page) */
.project { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; padding: 32px 0; border-top: 1px solid var(--line); align-items: start; }
.project:last-child { border-bottom: 1px solid var(--line); }
.project .cover { border-radius: var(--radius); display: block; aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.project .cover .inner { position: absolute; inset: 0; display: grid; place-items: center; background: var(--cover); transition: transform .8s var(--ease); }
.project:hover .cover .inner { transform: scale(1.04); }
.project .cover span { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; padding: 6px 10px; background: rgba(255, 255, 255, .85); }
.project .meta { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); letter-spacing: 0; margin-bottom: 14px; }
.project h3 { font-weight: 600; font-size: var(--t-heading-l); line-height: 1.12; }
.project p { margin-top: 14px; font-size: var(--t-body-m); line-height: 1.6; color: var(--ink-2); max-width: 44ch; }
.project .facts { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: var(--t-body-s); }
.project .facts dt { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); padding-top: 2px; }
.project .more { margin-top: 22px; }

/* ---------- Skills bento ---------- */
.bento { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-template-rows: auto auto; gap: 14px; }
.tile { border-radius: var(--radius); background: #fff; border: 1px solid var(--line); padding: 26px; position: relative; overflow: hidden; }
.tile .label { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.skills-tile { grid-row: span 2; background: linear-gradient(165deg, #FAF4EA 0%, #F3E8DA 60%, #F1E5E2 100%); border: 0; }
.skill-list { list-style: none; margin: 4px 0 26px; padding-left: 20px; }
.skill-list li { position: relative; font-family: var(--body); font-weight: 500; font-size: var(--t-heading-l); line-height: 1.4; letter-spacing: -.015em; color: rgba(28, 26, 23, .28); cursor: default; transition: color .35s ease; }
.skill-list li.is-on { color: var(--ink); }
.skill-list li.is-on::after { content: ''; position: absolute; left: -20px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--marigold); }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; }
.stat b { font-family: var(--body); font-weight: 600; font-size: var(--t-display-l); line-height: .9; letter-spacing: -.045em; }
.stat b sup { font-family: var(--body); font-weight: 600; font-size: .3em; letter-spacing: 0; color: var(--marigold); margin-left: 4px; vertical-align: super; }
.stat.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.stat.dark .label { color: #A39D92; }
.ai-tile { grid-column: span 2; border: 0; color: var(--ink); background: linear-gradient(135deg, #F7F0E6 0%, #F2E6D8 60%, #EFE3E1 100%); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 26px; align-items: start; }
.ai-tile .label { color: var(--ink-2); }
.ai-copy .say { margin-top: 14px; font: 500 var(--t-heading-l)/1.22 var(--body); letter-spacing: -.015em; }
.ai-copy .say em { font-style: normal; color: var(--accent-text); }
.ai-copy .sub { margin-top: 12px; font-size: var(--t-body-s); line-height: 1.55; color: var(--ink-2); max-width: 36ch; }
.ai-copy .sub code { font: 500 12.5px/1 ui-monospace, 'SF Mono', Menlo, monospace; background: rgba(255, 255, 255, .7); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
/* the editor: rules on top, the AI's output below it */
.ed { border-radius: 16px; background: #FFFDF9; border: 1px solid rgba(28, 26, 23, .08); box-shadow: 0 22px 40px -30px rgba(120, 82, 40, .5); overflow: hidden; }
.ed-tabs { display: flex; gap: 2px; padding: 8px 8px 0; background: #F6F0E7; border-bottom: 1px solid var(--line); }
.ed-tabs button { font: 500 12.5px/1 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--muted); background: none; border: 0; padding: 9px 12px 10px; border-radius: 10px 10px 0 0; cursor: pointer; }
.ed-tabs button[aria-selected="true"] { background: #FFFDF9; color: var(--ink); }
@media (max-width: 760px) { .ed-path { display: none; } }
.ed-pane { padding: 14px 16px 12px; font: 400 13px/1.75 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink-2); height: 250px; overflow: auto; }
.ed-pane[hidden] { display: none; }
.ed-pane .h { color: var(--accent-text); font-weight: 600; }
.ed-pane .m { color: var(--faint); }
.ed-pane .k { color: #5E7F57; }
.rule { display: flex; align-items: center; gap: 10px; width: 100%; padding: 3px 6px; margin: 0 -6px; border: 0; border-radius: 8px; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .4s var(--ease), background .2s; }
.rule.shown { opacity: 1; transform: none; }
.rule:hover { background: rgba(169, 82, 10, .06); }
.rule .sw { flex: none; width: 26px; height: 15px; border-radius: 999px; background: #DDD5C8; position: relative; transition: background .3s; }
.rule .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.rule[aria-pressed="true"] .sw { background: #5E7F57; }
.rule[aria-pressed="true"] .sw::after { transform: translateX(11px); }
.rule[aria-pressed="false"] .txt { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(28, 26, 23, .25); }
.ed-out { border-top: 1px dashed var(--line); padding: 12px 16px 16px; background: #FBF7F1; }
.ed-out .lbl { display: flex; justify-content: space-between; font: 500 12px/1 var(--body); color: var(--muted); margin-bottom: 10px; }
.ed-out .lbl b { font-weight: 500; color: #5E7F57; }
.ui { border-radius: 14px; background: #fff; border: 1px solid var(--line); padding: 14px; display: grid; gap: 6px; }
.ui .t { font: 600 15px/1.25 var(--heading); letter-spacing: -.01em; transition: letter-spacing .3s; }
.ui .t.caps { letter-spacing: .06em; }
.ui .c { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.ui .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ui .acts span { font: 500 12.5px/1 var(--body); padding: 9px 14px; border-radius: 4px; background: #3B6FE0; color: #fff; transition: background .4s, border-radius .4s; }
.ui .acts span.ghost { background: #EEF1F7; color: #3B4A6B; }
.ui.brand .acts span { background: var(--accent-text); border-radius: 999px; }
.ui.brand .acts span.ghost { background: var(--tint-marigold); color: var(--ink); }
.ui .flash { animation: ui-flash .6s ease; }
@keyframes ui-flash { from { background: var(--tint-marigold); } }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tools span { font: 500 var(--t-label)/1.4 var(--body); background: rgba(255, 255, 255, .7); padding: 5px 11px; border-radius: 999px; }
.stack { border-radius: var(--radius); margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 20px 24px 22px; background: var(--paper-2); }
.stack b { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); margin-right: 10px; }
.stack .logo { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.stack .logo img { width: 24px; height: 24px; }
.stack .logo i { position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); font-style: normal; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; white-space: nowrap; background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); z-index: 2; }
.stack .logo:hover, .stack .logo:focus-visible { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 10px 20px -12px rgba(120, 82, 40, .4); }
.stack .logo:hover i, .stack .logo:focus-visible i { opacity: 1; transform: translate(-50%, 0); }

/* Process steps (skills page) */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--ink); }
.step { padding: 22px 18px 26px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .n { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.step h4 { font-weight: 600; font-size: var(--t-heading-m); margin: 14px 0 8px; }
.step p { font-size: var(--t-body-s); line-height: 1.55; color: var(--ink-2); }
.skillset { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.skillset > div { padding: 26px 26px 30px 0; border-bottom: 1px solid var(--line); }
.skillset h4 { font-weight: 600; font-size: var(--t-heading-m); }
.skillset p { margin-top: 8px; font-size: var(--t-body-s); line-height: 1.55; color: var(--ink-2); max-width: 34ch; }
.skillset ul { list-style: none; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.skillset li { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; border: 1px solid var(--line); padding: 5px 9px; }

/* ---------- Experience ---------- */
.xp { display: grid; grid-template-columns: 190px 1fr auto; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); align-items: baseline; }
.xp:last-of-type { border-bottom: 1px solid var(--line); }
.xp .when, .role .when { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); letter-spacing: 0; display: flex; gap: 8px; align-items: center; }
.xp .when.now::before, .role .when.now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--marigold); box-shadow: 0 0 0 0 rgba(242, 140, 27, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(242, 140, 27, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 140, 27, 0); } }
.xp h4 { font-weight: 600; font-size: var(--t-heading-m); }
.xp h4 small { display: block; font-family: var(--body); font-size: var(--t-body-s); font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 4px; }
.xp .what { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; border: 1px solid var(--ink); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }

/* Expandable roles (experience page) */
.role { border-top: 1px solid var(--line); }
.role:last-of-type { border-bottom: 1px solid var(--line); }
.role summary { list-style: none; display: grid; grid-template-columns: 190px 1fr auto 34px; gap: 24px; align-items: baseline; padding: 28px 0; cursor: pointer; }
.role summary::-webkit-details-marker { display: none; }
.role summary .what { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.role summary .plus { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 500 var(--t-body-m)/1 var(--body); transition: transform .4s var(--ease), background .3s; align-self: center; }
.role[open] summary .plus { transform: rotate(45deg); background: var(--ink); color: var(--paper); border-color: var(--ink); }
.role summary h3 { font-weight: 600; font-size: var(--t-heading-l); line-height: 1.1; }
.role summary h3 small { display: block; font-family: var(--body); font-size: var(--t-body-s); font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 6px; }
.role .body { display: grid; grid-template-columns: 190px 1fr 1fr; gap: 24px; padding: 0 0 34px; }
.role .body h5 { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); margin-bottom: 10px; }
.role .body p, .role .body li { font-size: var(--t-body-m); line-height: 1.6; color: var(--ink-2); }
.role .body ul { list-style: none; }
.role .body li::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-2); margin: 0 10px 2px 0; vertical-align: middle; }

/* ---------- About: fanned polaroids that scroll sideways ---------- */
.about { background: var(--paper-2); }
.fan { display: flex; overflow-x: auto; padding: 60px 40px 50px 70px; margin: 50px calc(var(--gutter) * -1) 0; scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab; }
.fan::-webkit-scrollbar { display: none; }
.polaroid { flex: 0 0 auto; width: clamp(180px, 20vw, 250px); margin-left: -30px; background: #FFFDF9; padding: 10px 10px 0; border-radius: 22px; box-shadow: 0 18px 36px -18px rgba(120, 82, 40, .32), 0 2px 6px rgba(120, 82, 40, .06); transform: rotate(calc(var(--r, 0deg) * .6)) translateY(var(--y, 0)); transition: transform .6s var(--ease), box-shadow .6s; scroll-snap-align: center; position: relative; }
.polaroid:hover { transform: rotate(0) translateY(-12px) scale(1.03); z-index: 5; box-shadow: 0 26px 44px -18px rgba(120, 82, 40, .38), 0 2px 6px rgba(120, 82, 40, .06); }
.polaroid .ph { aspect-ratio: 4 / 5; background: #E9E1D3; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: #7E7769; }
.polaroid .ph img { width: 100%; height: 100%; object-fit: cover; }
.polaroid p { font: 500 var(--t-body-s)/1.4 var(--body); letter-spacing: -.005em; padding: 12px 6px 16px; text-align: left; color: var(--ink); }
.fan-hint { display: flex; justify-content: flex-end; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 70px; }
.note { background: #FFFDF9; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 24px -18px rgba(120, 82, 40, .3); }
.note .body { padding: 18px 18px 22px; }
.note b { display: block; margin: 0 0 6px; font-family: var(--heading); font-weight: 600; font-size: var(--t-heading-s); letter-spacing: -.01em; color: var(--ink); }
.note span { display: block; font: 400 var(--t-body-s)/1.55 var(--body); letter-spacing: 0; color: var(--ink-2); }
.quote { margin: 90px 0 0 auto; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--heading); font-weight: 500; font-size: var(--t-heading-l); line-height: 1.25; letter-spacing: -.02em; color: var(--ink-2); max-width: 640px; }

/* ---------- Next-page links ---------- */
.next { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.next a { padding: 26px 22px 30px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; transition: background .3s; }
.next a:last-child { border-right: 0; }
.next a .n { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.next a b { font-family: var(--display); font-weight: 600; font-size: var(--t-display-s); line-height: 1; letter-spacing: -.025em; }
.next a:hover b { color: var(--accent-text); }

/* ---------- Contact: a quiet glow seen through fluted glass ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; cursor: crosshair; touch-action: pan-y; background: #EEE7DC; color: var(--ink); padding: 110px var(--gutter) 36px; }
.ft-glow { position: absolute; inset: 0; z-index: -3; pointer-events: none; opacity: .7; }
.ft-glow i { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.ft-glow .g1 { width: 60vw; height: 60vw; max-width: 880px; max-height: 880px; left: -10%; top: 20%; background: radial-gradient(circle, rgba(222, 178, 132, .62) 0%, rgba(222, 178, 132, 0) 70%); animation: ft-a 26s ease-in-out infinite alternate; }
.ft-glow .g2 { width: 52vw; height: 52vw; max-width: 780px; max-height: 780px; right: -8%; top: -14%; background: radial-gradient(circle, rgba(206, 160, 160, .5) 0%, rgba(206, 160, 160, 0) 70%); animation: ft-b 30s ease-in-out infinite alternate; }
.ft-glow .g3 { width: 40vw; height: 40vw; max-width: 600px; max-height: 600px; left: 40%; bottom: -24%; background: radial-gradient(circle, rgba(232, 208, 156, .55) 0%, rgba(232, 208, 156, 0) 70%); animation: ft-c 24s ease-in-out infinite alternate; }
.ft-glow .g4 { width: 28vw; height: 28vw; max-width: 420px; max-height: 420px; right: 10%; bottom: 0; background: radial-gradient(circle, rgba(160, 178, 150, .45) 0%, rgba(160, 178, 150, 0) 70%); animation: ft-b 28s ease-in-out infinite alternate-reverse; }
@keyframes ft-a { to { transform: translate(10vw, -6vh) scale(1.06); } }
@keyframes ft-b { to { transform: translate(-8vw, 8vh) scale(.95); } }
@keyframes ft-c { to { transform: translate(-12vw, -5vh) scale(1.08); } }
/* flowing silk (WebGL, drawn by site.js); the glow above is the fallback without WebGL */
.ft-silk { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; }
.has-silk .ft-glow { display: none; }
.has-silk .ft-reeds { display: none; }
/* fluted glass: narrow lenses whose highlight drifts with the cursor */
.ft-reeds { position: absolute; inset: 0; z-index: -1; display: flex; pointer-events: none; }
.ft-reeds span { flex: 1 1 0; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: linear-gradient(90deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .04) 30%, rgba(255, 255, 255, 0) 60%, rgba(90, 70, 50, .05) 92%, rgba(90, 70, 50, .08) 100%); background-size: 140% 100%; background-position: calc(var(--mx, .5) * 100%) 0; }
/* fine paper grain over everything */
.contact::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ft-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.ft-grid { width: fit-content; max-width: 100%; display: grid; grid-template-columns: repeat(3, minmax(120px, 210px)); border-top: 1px solid rgba(28, 26, 23, .18); }
.ft-grid a { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 13px 18px 13px 0; border-bottom: 1px solid rgba(28, 26, 23, .18); font: 500 var(--t-body-s)/1.3 var(--body); color: var(--ink-2); transition: color .3s; }
.ft-grid a::before { content: '→'; order: 2; opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .45s var(--ease); font-size: 13px; }
.ft-grid a::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 0; height: 1px; background: var(--ink); transition: width .6s var(--ease); }
.ft-grid a:hover, .ft-grid a:focus-visible { color: var(--ink); }
.ft-grid a:hover::before, .ft-grid a:focus-visible::before { opacity: 1; transform: none; }
.ft-grid a:hover::after, .ft-grid a:focus-visible::after { width: calc(100% - 18px); }
.ft-meta { display: grid; justify-items: end; gap: 12px; font: 500 var(--t-body-s)/1.4 var(--body); color: var(--ink); text-align: right; }
.ft-meta small { display: block; color: var(--muted); font-size: 13px; }
.ft-hint { font-size: 13px; color: var(--ink-2); max-width: 22ch; }
.contact a, .contact button { cursor: pointer; }
.ft-up { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(28, 26, 23, .18); background: rgba(255, 253, 249, .45); font: 500 var(--t-body-s)/1 var(--body); color: var(--ink-2); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.ft-up:hover { background: rgba(255, 253, 249, .85); color: var(--ink); border-color: rgba(28, 26, 23, .35); }
.ft-big { display: inline-flex; align-items: center; gap: .14em; margin-top: clamp(72px, 13vw, 170px); font: 600 clamp(56px, 11.5vw, 184px)/.95 var(--display); letter-spacing: -.035em; color: var(--ink); transition: transform .9s var(--ease); will-change: transform; }
.ft-big svg { flex: none; width: .44em; height: .44em; stroke-width: 1.6; color: var(--ink-2); transition: transform .8s var(--ease), color .4s; }
.ft-big:hover svg, .ft-big:focus-visible svg { transform: rotate(45deg); color: var(--accent-text); }
.contact .sub { margin-top: 18px; font: 400 var(--t-body-l)/1.6 var(--body); color: var(--ink-2); max-width: 46ch; }
.ft-foot { margin-top: 64px; padding-top: 18px; border-top: 1px solid rgba(28, 26, 23, .15); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 var(--t-label)/1.4 var(--body); color: var(--muted); }
.ft-foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) {
  .contact { padding-top: 80px; }
  .ft-top { grid-template-columns: 1fr; gap: 28px; }
  .ft-grid { width: 100%; grid-template-columns: 1fr 1fr; }
  .ft-meta { justify-items: start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .ft-glow i { animation: none; }
  .ft-big, .ft-big svg { transition: none; }
}

/* ---------- Case study ---------- */
.cs-meta { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ink); }
.cs-meta div { padding: 18px 18px 22px 0; border-right: 1px solid var(--line); }
.cs-meta div:last-child { border-right: 0; }
.cs-meta dt { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.cs-meta dd { margin-top: 8px; font-size: var(--t-body-m); line-height: 1.45; }
.cs-cover { border-radius: var(--radius); margin-top: 40px; aspect-ratio: 16 / 8; background: var(--cover); display: grid; place-items: center; }
.cs-cover span { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; background: rgba(255, 255, 255, .85); padding: 6px 10px; }
.cs { display: grid; grid-template-columns: 210px 1fr; gap: 60px; }
.toc { position: sticky; top: 90px; align-self: start; list-style: none; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; display: grid; gap: 10px; }
.toc a { color: var(--muted); transition: color .3s; }
.toc a.is-on { color: var(--ink); }
.toc a.is-on::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--marigold); margin-right: 8px; vertical-align: middle; }
.cs-block { padding: 0 0 90px; }
.cs-block .num { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--marigold); }
.cs-block h2 { font-family: var(--display); font-weight: 600; font-size: var(--t-display-m); line-height: 1; letter-spacing: -.025em; margin: 12px 0 22px; }
.cs-block p { font-size: var(--t-body-l); line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.cs-block p + p { margin-top: 14px; }
.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.insight { border-radius: var(--radius-sm); background: var(--tint, #fff); padding: 22px; }
.insight .n { font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); }
.insight h4 { font-weight: 600; font-size: var(--t-heading-m); line-height: 1.2; margin: 12px 0 8px; }
.insight p { font-size: var(--t-body-s); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.shots div { border-radius: var(--radius-sm); aspect-ratio: 9 / 16; background: var(--paper-2); border: 1px dashed var(--faint); display: grid; place-items: center; font: 500 var(--t-label)/1.4 var(--body); letter-spacing: 0; color: var(--muted); text-align: center; padding: 10px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); margin-top: 28px; }
.metrics div { padding: 20px 18px 24px 0; border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics b { font-family: var(--display); font-weight: 600; font-size: var(--t-display-m); line-height: 1; display: block; letter-spacing: -.025em; }
.metrics span { font-size: var(--t-body-s); color: var(--ink-2); }
.pullquote { margin: 34px 0 6px; padding-left: 22px; border-left: 2px solid var(--marigold); font-family: var(--heading); font-weight: 500; font-size: var(--t-heading-l); line-height: 1.3; letter-spacing: -.02em; color: var(--ink); max-width: 34ch; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .skills-tile { grid-row: auto; grid-column: span 2; }
  .ai-tile { grid-column: span 2; grid-template-columns: 1fr; }
  .ai-teaser { grid-column: span 2; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step:nth-child(3) { border-right: 0; }
  .skillset { grid-template-columns: 1fr 1fr; }
  .notes { grid-template-columns: 1fr 1fr; }
  .cs { grid-template-columns: 1fr; }
  .toc { display: none; }
  .cs-meta { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav { grid-template-columns: 1fr auto; padding: 14px var(--gutter); }
  .nav ul { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav ul a { display: block; padding: 14px var(--gutter); border-top: 1px solid var(--line); }
  .nav.is-open ul { display: flex; }
  .nav.is-open { background: var(--paper); }
  .nav .cta { display: none; }
  .nav .menu { display: block; }
  .hint > span { display: none; }
  section { padding: 90px var(--gutter); }
  .page-head .inner { top: 96px; }
  .wrow { flex-direction: column; min-height: 0; }
  .wcard { flex: none; flex-direction: column; min-height: 260px; }
  .wcard .desc { opacity: 1; transform: none; }
  .wcard .shot { flex-basis: auto; opacity: 1; aspect-ratio: 16 / 10; }
  .wrow:hover .wcard, .wrow .wcard:hover { flex-grow: 1; }
  .project { grid-template-columns: 1fr; gap: 20px; }
  .bento { grid-template-columns: 1fr; }
  .skills-tile, .ai-tile { grid-column: auto; }
  .ai-tile { grid-template-columns: 1fr; }
  .ai-teaser { grid-column: auto; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .skillset { grid-template-columns: 1fr; }
  .xp, .role summary { grid-template-columns: 1fr auto; gap: 6px 14px; }
  .xp .when, .role summary .when { grid-column: 1 / -1; }
  .xp .what { grid-column: 1 / -1; justify-content: flex-start; }
  .role summary .what { display: none; }
  .role .body { grid-template-columns: 1fr; }
  .role .body > :first-child { display: none; }
  .notes { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
  .next a { border-right: 0; border-bottom: 1px solid var(--line); }
  .links { grid-template-columns: 1fr 1fr; }
  .fan { padding-left: 50px; }
  .insights, .shots, .metrics { grid-template-columns: 1fr; }
  .shots div { aspect-ratio: 16 / 10; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta div { border-right: 0; border-bottom: 1px solid var(--line); }
  .eyebrow { flex-wrap: wrap; row-gap: 8px; }
  .eyebrow a { white-space: nowrap; }
}
/* ---------- About: messaging app ---------- */
.chatapp { position: relative; display: grid; grid-template-columns: 270px minmax(0, 1fr) 280px; height: 640px; background: #FFFDF9; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: 0 40px 70px -50px rgba(120, 82, 40, .45); }
.ca-threads { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #FBF8F2; min-width: 0; }
.ca-threads header { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 20px 12px; }
.ca-threads header b { font: 600 var(--t-heading-m)/1.2 var(--heading); letter-spacing: -.015em; }
.ca-threads header span { font: 500 var(--t-label)/1.4 var(--body); color: var(--muted); }
.ca-list { list-style: none; overflow-y: auto; padding: 0 8px 12px; display: grid; gap: 2px; align-content: start; }
.ca-thread { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 0; border-radius: 16px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .2s; }
.ca-thread:hover { background: var(--paper-2); }
.ca-thread.is-active { background: #fff; box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(120, 82, 40, .35); }
.ca-thread .ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--tint, var(--paper-2)); }
.ca-thread .nm { display: block; font: 600 var(--t-body-s)/1.3 var(--heading); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ca-thread .pv { display: block; font-size: 13px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ca-thread .meta { display: grid; justify-items: end; gap: 6px; font-size: 12px; color: var(--muted); }
.ca-thread .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--marigold); }
.ca-thread.is-read .dot { visibility: hidden; }

.ca-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ca-top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #FFFDF9; }
.ca-top .av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none; }
.ca-top .av img { width: 100%; height: 100%; object-fit: cover; }
.ca-top b { display: block; font: 600 var(--t-body-m)/1.25 var(--heading); letter-spacing: -.01em; }
.ca-top span { font-size: 13px; color: var(--muted); }
.ca-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 8px; display: flex; flex-direction: column; gap: 3px; background: var(--paper); scroll-behavior: smooth; }
.ca-day { align-self: center; font: 500 12px/1 var(--body); color: var(--muted); background: var(--paper-2); padding: 6px 10px; border-radius: 999px; margin: 4px 0 12px; }
.ca-row { display: flex; align-items: flex-end; gap: 8px; max-width: 86%; animation: ca-in .35s var(--ease) both; }
.ca-row.you { align-self: flex-end; flex-direction: row-reverse; }
.ca-row .av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; visibility: hidden; }
.ca-row .av img { width: 100%; height: 100%; object-fit: cover; }
.ca-row.tail .av { visibility: visible; }
.ca-row.you .av { display: none; }
@keyframes ca-in { from { opacity: 0; transform: translateY(6px); } }
.ca-b { padding: 10px 14px; border-radius: 20px; font-size: var(--t-body-m); line-height: 1.45; overflow-wrap: break-word; }
.me .ca-b { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.me.tail .ca-b { border-bottom-left-radius: 6px; }
.you .ca-b { background: var(--ink); color: var(--paper); }
.you.tail .ca-b { border-bottom-right-radius: 6px; }
.ca-b.big { font: 500 var(--t-heading-m)/1.3 var(--heading); letter-spacing: -.015em; padding: 12px 16px; }
.ca-b.photo { padding: 5px; }
.ca-b.photo .ph { width: min(260px, 60vw); aspect-ratio: 4 / 3; border-radius: 15px; background: #E9E1D3; display: grid; place-items: center; font: 500 var(--t-label)/1.4 var(--body); color: #7E7769; overflow: hidden; }
.ca-b.photo .ph img { width: 100%; height: 100%; object-fit: cover; }
.ca-b.photo small { display: block; padding: 7px 8px 4px; font-size: 13px; color: var(--ink-2); }
.ca-b.link { padding: 0; overflow: hidden; display: block; min-width: 220px; }
.ca-b.link .lk-top { height: 70px; background: var(--tint-marigold); }
.ca-b.link .lk { padding: 10px 14px 12px; }
.ca-b.link b { display: block; font: 600 var(--t-body-s)/1.3 var(--heading); }
.ca-b.link span { font-size: 13px; color: var(--muted); }
.ca-b.link:hover b { color: var(--accent-text); }
.ca-time { font-size: 12px; color: var(--muted); margin: 4px 0 10px 36px; }
.ca-time.you { align-self: flex-end; margin: 4px 2px 10px 0; }
.ca-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.ca-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: dot 1.1s infinite; }
.ca-typing i:nth-child(2) { animation-delay: .15s; } .ca-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { opacity: .35; transform: translateY(-2px); } }
.ca-compose { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: #FFFDF9; }
.ca-compose input { flex: 1; min-width: 0; font: 400 var(--t-body-m)/1.4 var(--body); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 12px 18px; outline: none; }
.ca-compose input:focus { border-color: var(--ink-2); }
.ca-compose button { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); font-size: 18px; cursor: pointer; transition: background .2s; }
.ca-compose button:hover { background: var(--accent-text); }

.ca-info { border-left: 1px solid var(--line); padding: 24px 22px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; min-width: 0; }
.ca-info .av { flex: none; width: 92px; height: 92px; border-radius: 50%; overflow: hidden; }
.ca-info .av img { width: 100%; height: 100%; object-fit: cover; }
.ca-info .who b { display: block; font: 600 var(--t-heading-m)/1.2 var(--heading); letter-spacing: -.015em; }
.ca-info .who > span { display: block; font-size: var(--t-body-s); color: var(--ink-2); margin-top: 4px; }
.ca-info h5 { font: 500 var(--t-label)/1.4 var(--body); color: var(--muted); letter-spacing: 0; margin-bottom: 10px; }
.ca-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ca-photos figure { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #E9E1D3; display: grid; place-items: center; font-size: 10.5px; color: #7E7769; text-align: center; padding: 4px; }
.ca-photos figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ca-photos figcaption { position: absolute; inset: auto 0 0; padding: 14px 6px 5px; font-size: 11px; line-height: 1.2; color: #fff; background: linear-gradient(transparent, rgba(28, 26, 23, .7)); opacity: 0; transition: opacity .25s; }
.ca-photos figure:hover figcaption { opacity: 1; }
.ca-links { display: grid; border-top: 1px solid var(--line); }
.ca-links a { padding: 11px 0; border-bottom: 1px solid var(--line); font: 500 var(--t-body-s)/1.4 var(--body); display: flex; justify-content: space-between; }
.ca-links a:hover { color: var(--accent-text); }

/* Photo viewer (opens over the chat app, like WhatsApp Web) */
.ca-photos figure, .ca-b.photo .ph[data-open] { cursor: zoom-in; }
.ca-photos figure:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ca-viewer { position: absolute; inset: 0; z-index: 10; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: rgba(251, 248, 242, .95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: inherit; animation: cv-in .3s var(--ease) both; }
.ca-viewer[hidden] { display: none; }
@keyframes cv-in { from { opacity: 0; } }
.cv-top { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cv-top .av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex: none; }
.cv-top .av img { width: 100%; height: 100%; object-fit: cover; }
.cv-top b { display: block; font: 600 var(--t-body-s)/1.3 var(--heading); }
.cv-top span { font-size: 13px; color: var(--muted); }
.cv-close { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font: 400 22px/1 var(--body); color: var(--ink); cursor: pointer; }
.cv-close:hover { border-color: var(--ink); }
.cv-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px; min-height: 0; touch-action: pan-y; }
.cv-nav { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 400 22px/1 var(--body); cursor: pointer; transition: border-color .2s, transform .2s; }
.cv-nav:hover { border-color: var(--ink); transform: scale(1.05); }
.cv-nav:disabled { opacity: .3; cursor: default; transform: none; }
.cv-frame { justify-self: center; display: grid; justify-items: center; gap: 12px; min-height: 0; max-height: 100%; }
.cv-img { height: clamp(220px, 44vh, 440px); max-height: 100%; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #E9E1D3; display: grid; place-items: center; font: 500 var(--t-label)/1.4 var(--body); color: #7E7769; box-shadow: 0 30px 60px -30px rgba(120, 82, 40, .5); animation: cv-pop .35s var(--ease) both; }
.cv-img img { width: 100%; height: 100%; object-fit: cover; }
@keyframes cv-pop { from { opacity: 0; transform: scale(.96); } }
.cv-cap { font: 500 var(--t-body-m)/1.4 var(--body); color: var(--ink); text-align: center; }
.cv-strip { display: flex; justify-content: center; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--line); overflow-x: auto; }
.cv-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #E9E1D3; font: 500 10px/1.2 var(--body); color: #7E7769; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.cv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-thumb:hover { opacity: .85; }
.cv-thumb.is-on { opacity: 1; border-color: var(--ink); }
@media (max-width: 1100px) {
  .ca-viewer { position: fixed; border-radius: 0; z-index: 60; }
  .cv-img { height: min(52vh, 480px); }
}
@media (max-width: 760px) {
  .cv-stage { grid-template-columns: 1fr; padding: 16px; }
  .cv-nav { display: none; }
  .cv-img { height: auto; width: min(82vw, 380px); }
  .cv-strip { justify-content: flex-start; }
  .cv-thumb { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .ca-viewer, .cv-img { animation: none; }
}

@media (max-width: 1100px) {
  .chatapp { grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: 600px auto; height: auto; }
  .ca-info { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr 1.4fr 1fr; align-items: start; gap: 24px; }
  .ca-info .av { width: 72px; height: 72px; }
}
@media (max-width: 760px) {
  .chatapp { grid-template-columns: 1fr; grid-template-rows: auto 540px auto; border-radius: 20px; margin: 0 calc(var(--gutter) * -.5); }
  .ca-threads { border-right: 0; border-bottom: 1px solid var(--line); }
  .ca-threads header { display: none; }
  .ca-list { display: flex; overflow-x: auto; overflow-y: hidden; padding: 10px; gap: 6px; scrollbar-width: none; }
  .ca-list::-webkit-scrollbar { display: none; }
  .ca-thread { width: auto; grid-template-columns: 34px auto; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--paper-2); }
  .ca-thread .ic { width: 34px; height: 34px; font-size: 16px; }
  .ca-thread .pv, .ca-thread .meta { display: none; }
  .ca-msgs { padding: 14px 12px 6px; }
  .ca-row { max-width: 92%; }
  .ca-info { grid-template-columns: auto 1fr; gap: 18px; }
  .ca-info .ca-photos-wrap, .ca-info .ca-links-wrap { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .ca-row { animation: none; }
  .ca-msgs { scroll-behavior: auto; }
}

/* ---------- AI showcase: "Built with AI. Directed by me." ---------- */
.ai-show { position: relative; isolation: isolate; height: 420vh; padding: 0; background: #F4EDE3; }
.ai-show .pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 4vw; padding: 90px max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 50px; }
/* soft drifting light behind everything */
.ai-show .wash { position: absolute; inset: -10%; z-index: -1; pointer-events: none; }
.ai-show .wash i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; }
.ai-show .wash i:nth-child(1) { width: 48vw; height: 48vw; left: -6%; top: 8%; background: radial-gradient(circle, rgba(233, 196, 160, .9), rgba(233, 196, 160, 0) 70%); animation: wash-a 22s ease-in-out infinite alternate; }
.ai-show .wash i:nth-child(2) { width: 42vw; height: 42vw; right: -4%; top: -6%; background: radial-gradient(circle, rgba(220, 176, 178, .8), rgba(220, 176, 178, 0) 70%); animation: wash-b 26s ease-in-out infinite alternate; }
.ai-show .wash i:nth-child(3) { width: 36vw; height: 36vw; right: 18%; bottom: -14%; background: radial-gradient(circle, rgba(186, 198, 170, .7), rgba(186, 198, 170, 0) 70%); animation: wash-a 30s ease-in-out infinite alternate-reverse; }
@keyframes wash-a { to { transform: translate(8vw, 6vh) scale(1.08); } }
@keyframes wash-b { to { transform: translate(-7vw, 8vh) scale(.94); } }
.ai-show .kick { font: 500 var(--t-label)/1.4 var(--body); color: var(--ink-2); display: inline-flex; gap: 10px; align-items: center; }
.ai-show .kick::before { content: ''; width: 26px; height: 1.5px; background: var(--accent-text); }
/* the living headline: every letter's weight follows the cursor */
.live { position: relative; z-index: 2; margin-top: 18px; font-family: var(--heading); font-size: clamp(48px, 6.2vw, 96px); line-height: .92; letter-spacing: -.045em; color: var(--ink); cursor: default; user-select: none; }
.live .ln { display: block; white-space: nowrap; }
.live .ln + .ln { margin-top: .04em; }
.live span { display: inline-block; font-variation-settings: 'wght' var(--w, 300); font-weight: 300; will-change: font-variation-settings; }
.live .accent { color: var(--accent-text); }
.ai-show .lede { margin-top: 26px; max-width: 34ch; font: 400 var(--t-body-l)/1.55 var(--body); color: var(--ink-2); }
.ai-show .count { position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); bottom: 42px; display: flex; align-items: baseline; gap: 14px; font-family: var(--heading); color: var(--ink); }
.ai-show .count b { font-weight: 200; font-size: clamp(54px, 6vw, 88px); line-height: 1; letter-spacing: -.04em; font-variation-settings: 'wght' 200; }
.ai-show .count small { font: 500 var(--t-label)/1.4 var(--body); color: var(--ink-2); }
.ai-show .count .bar { width: 120px; height: 2px; background: rgba(28, 26, 23, .12); position: relative; align-self: center; }
.ai-show .count .bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-text); transition: width .4s var(--ease); }
/* the stack of prompt cards */
.deck2 { position: relative; height: min(64vh, 520px); }
.pc { position: absolute; left: 6%; right: 2%; top: 8%; padding: 30px 30px 26px; border-radius: 22px; background: #FFFDF8; box-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 30px 60px -36px rgba(120, 82, 40, .55); transform-origin: 30% 120%; transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .7s ease; will-change: transform; }
.pc .when { font: 500 var(--t-label)/1 var(--body); color: var(--muted); }
.pc .said { margin-top: 16px; font-family: var(--heading); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.pc .said b { font-weight: 800; }
.pc .said::before { content: '\201C'; color: var(--accent-text); font-weight: 300; margin-left: -.42em; margin-right: .04em; }
.pc .said::after { content: '\201D'; color: var(--accent-text); font-weight: 300; }
.pc .row { margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.pc .became { flex: 1 1 220px; padding: 12px 14px; border-radius: 12px; background: #F6EFE5; font: 500 13.5px/1.5 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink); opacity: .25; transition: opacity .5s ease; }
.pc .became small { display: block; font: 500 12px/1 var(--body); color: var(--muted); margin-bottom: 6px; }
.pc.ruled .became { opacity: 1; }
.pc .stamp { position: absolute; right: 22px; top: 22px; padding: 7px 12px; border: 2px solid var(--accent-text); border-radius: 10px; font: 700 13px/1 var(--heading); letter-spacing: .02em; color: var(--accent-text); transform: rotate(-9deg) scale(1.6); opacity: 0; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; }
.pc.ruled .stamp { transform: rotate(-9deg) scale(1); opacity: .9; }
.pc .viz { flex: none; }
.ai-show-mobile { display: none; }
@media (max-width: 900px), (max-height: 560px) {
  .ai-show { height: auto; }
  .ai-show .pin { position: relative; height: auto; grid-template-columns: minmax(0, 1fr); padding: 90px var(--gutter) 70px; gap: 34px; }
  .ai-show .count { display: none; }
  .deck2 { height: auto; display: grid; gap: 18px; }
  .pc { position: relative; inset: auto; transform: rotate(calc(var(--tilt, 0deg) * .5)) !important; opacity: 1 !important; }
  .pc .became { opacity: 1; }
  .pc .stamp { opacity: .9; transform: rotate(-9deg); }
  .live { font-size: clamp(34px, 13.4vw, 84px); }
}
@media (max-width: 420px) {
  .pc { padding: 24px 20px 20px; }
  .pc .said { font-size: clamp(21px, 7vw, 26px); }
  .pc .became { flex-basis: 100%; font-size: 12.5px; }
  .pc .stamp { right: 14px; top: 14px; padding: 6px 10px; font-size: 12px; }
  .pc .when { display: block; padding-right: 100px; line-height: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-show .wash i { animation: none; }
  .pc, .pc .stamp, .pc .became { transition: none; }
}
/* tiny before → after drawings used in the AI showcase */
.viz { display: flex; align-items: center; gap: 8px; }
.viz .arrow { color: var(--accent-text); font-size: 14px; }
.viz .b, .viz .a { flex: none; width: 82px; height: 56px; border-radius: 9px; background: #F6EFE5; display: grid; place-items: center; overflow: hidden; position: relative; }
.viz .b { opacity: .65; }
.v-corner i { width: 44px; height: 30px; background: #E2D6C5; display: block; }
.v-corner .a i { border-radius: 10px; }
.v-caps .b { font: 700 8.5px/1 var(--heading); letter-spacing: .06em; white-space: nowrap; }
.v-caps .a { font: 600 13px/1 var(--heading); letter-spacing: -.02em; white-space: nowrap; }
.v-colour .b { background: linear-gradient(120deg, #FF7A00, #FF2E93 55%, #7A2CFF); }
.v-colour .a { background: linear-gradient(120deg, #E9D6BF, #D9B5A6 55%, #C8B6B4); }
.v-name b { position: relative; font: 500 13px/1 var(--wordmark); letter-spacing: .06em; }
.v-name .b::before, .v-name .a::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 25% 65%, #E3893A 0 7px, transparent 8px), radial-gradient(circle at 70% 35%, #C9506F 0 7px, transparent 8px), radial-gradient(circle at 52% 70%, #E8A93F 0 7px, transparent 8px); }
.v-name .a::before { background: radial-gradient(circle at 8% 78%, #E3893A 0 6px, transparent 7px), radial-gradient(circle at 92% 24%, #C9506F 0 6px, transparent 7px); }
.v-name .b b { opacity: .45; }
/* small teaser in the Skills bento that points to the showcase */
.ai-teaser { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, #F7F0E6 0%, #F2E6D8 60%, #EFE3E1 100%); border: 0; }
.ai-teaser p { font-family: var(--heading); font-size: clamp(28px, 3vw, 44px); line-height: 1; letter-spacing: -.04em; font-weight: 300; }
.ai-teaser p b { font-weight: 800; color: var(--accent-text); }
.ai-teaser a { align-self: flex-start; font: 500 var(--t-body-s)/1 var(--body); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); transition: background .3s; }
.ai-teaser a:hover { background: var(--accent-text); }

/* ---------- Device safety nets ---------- */
/* Large monitors: a little more width, same proportions */
@media (min-width: 1600px) {
  :root { --wrap: 1320px; --gutter: 40px; }
}
/* Tablets and laptops between phone and full desktop */
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --gutter: 24px; }
  .nav ul { gap: 20px; }
  section { padding-top: 110px; padding-bottom: 110px; }
  .xp { grid-template-columns: 150px 1fr auto; }
  .role summary { grid-template-columns: 150px 1fr auto 34px; }
  .role .body { grid-template-columns: 150px 1fr 1fr; }
}
/* Touch screens (phones, tablets): nothing important may depend on hover */
@media (hover: none) {
  .wcard .desc { opacity: 1; transform: none; }
  .wcard .shot { flex-basis: 40%; opacity: 1; }
  .wrow:hover .wcard, .wrow .wcard:hover { flex-grow: 1; }
  .wcard .arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .project:hover .cover .inner, .polaroid:hover { transform: none; }
}
/* Comfortable tap targets on touch screens and any phone-width screen */
@media (pointer: coarse), (max-width: 760px) {
  .nav .mark { display: inline-flex; align-items: center; min-height: 44px; }
  .nav .menu { min-height: 40px; padding: 8px 14px; }
  .more { padding-top: 12px; }
  .tabs button { min-height: 40px; }
  .hint button { min-height: 40px; padding: 8px 14px; }
}
/* Very narrow phones (Galaxy Fold, 280–340px) */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .hero h1 { font-size: 21vw; }
  .page-head h1 { font-size: 17vw; }
  .bento .stat { min-height: 140px; }
  .links { grid-template-columns: 1fr; }
  .cs-meta { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .polaroid { width: 70vw; }
}
/* Short landscape screens (phones on their side) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 360px; }
  .hero .wordmark p { margin-top: 14px; }
  .page-head { height: auto; min-height: 0; padding: 110px var(--gutter) 60px; }
  .page-head .inner { position: relative; top: 0; left: 0; right: 0; }
  .page-head h1 { font-size: clamp(48px, 9vw, 96px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .xp .when.now::before, .role .when.now::before { animation: none; }
}
