/* ============================================================
   Aria Barve — shared styles
   Palette carried over from the previous site.
   ============================================================ */

:root {
  /* ── surfaces: warm off-white ─────────────────────────── */
  --bg:        #f8f6f2;
  --panel:     #f1ede6;
  --card:      #ffffff;
  --card-2:    #f5f2ec;   /* subtle tint against white cards */
  --border:    rgba(111,79,224,0.16);
  --border-hi: rgba(111,79,224,0.40);
  --rule:      rgba(var(--shadow-rgb),0.10);

  /* ── ink ──────────────────────────────────────────────── */
  --text:      #1a1626;   /* was #eae5dd — inverted so it reads on light */
  --dim:       #54506b;   /* body copy */
  --muted:     #8a8598;   /* eyebrows, meta, captions */

  /* ── brand hues ───────────────────────────────────────────
     Two tiers each: the deep tone is what's legible as TEXT on
     off-white; the bright tone is your original colour, kept for
     fills, glows and anything with dark type sitting on top.   */
  --accent:        #6f4fe0;
  --accent-bright: #a78bfa;   /* original purple */
  --gold:          #b07f0c;
  --gold-bright:   #f0c060;   /* original gold */

  --grad:      linear-gradient(130deg, #6f4fe0 0%, #c08a12 100%);  /* gradient TEXT */
  --grad-fill: linear-gradient(130deg, #a78bfa 0%, #f0c060 100%);  /* gradient FILLS */
  --on-accent: #ffffff;       /* type on a filled purple button */
  --on-bright: #241a05;       /* type on a bright gold/gradient fill */

  /* ── theme-dependent surfaces ─────────────────────────── */
  --nav-bg:     rgba(248,246,242,.82);
  --deep:       #eae5db;   /* the darkest band on a light page */
  --shadow-rgb: 26,22,38;  /* drop-shadow tint */
  --grain:      .02;       /* film-grain strength */

  --nav-h:  62px;
  --maxw:   1080px;
  --pad:    2rem;
}

/* ══ DARK MODE ═══════════════════════════════════════════════
   The inline script in each <head> stamps data-theme on <html>
   before first paint (stored choice, else the OS preference),
   so only this one selector is needed — no flash, no duplication.
   The contact card deliberately keeps its bright gradient in both
   themes; it reads as an accent panel either way.               */
:root[data-theme="dark"] {
  --bg:        #14121b;
  --panel:     #1b1826;
  --card:      #201d2c;
  --card-2:    #262233;
  --border:    rgba(167,139,250,0.20);
  --border-hi: rgba(167,139,250,0.46);
  --rule:      rgba(255,255,255,0.09);

  --text:      #f0ecf7;
  --dim:       #b3adc6;
  --muted:     #8b85a0;

  /* the bright tier becomes the legible one once the page is dark */
  --accent:        #a78bfa;
  --accent-bright: #c4b0ff;
  --gold:          #f0c060;
  --gold-bright:   #ffd98a;

  --grad:      linear-gradient(130deg, #a78bfa 0%, #f0c060 100%);
  --on-accent: #14121b;    /* dark type on a filled purple button */

  --nav-bg:     rgba(20,18,27,.82);
  --deep:       #100e17;
  --shadow-rgb: 0,0,0;
  --grain:      .035;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

/* film grain */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9997;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

::selection { background: rgba(167,139,250,.35); color: var(--text); }

/* ── CURSOR ──────────────────────────────────────────────── */
#cur-dot {
  position: fixed; z-index: 9999;
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; transform: translate(-50%,-50%);
  transition: width .22s, height .22s, background .22s;
  will-change: left, top;
}
#cur-ring {
  position: fixed; z-index: 9998;
  width: 30px; height: 30px;
  border: 1.5px solid rgba(111,79,224,.42); border-radius: 50%;
  pointer-events: none; transform: translate(-50%,-50%);
  transition: width .3s cubic-bezier(.23,1,.32,1),
              height .3s cubic-bezier(.23,1,.32,1), border-color .3s;
  will-change: left, top;
}
body.ch #cur-dot  { width: 11px; height: 11px; background: var(--gold); }
body.ch #cur-ring { width: 46px; height: 46px; border-color: rgba(176,127,12,.32); }
body.cc #cur-dot  { transform: translate(-50%,-50%) scale(.6); }
@media (hover:none), (max-width: 860px) {
  #cur-dot, #cur-ring { display: none; }
  body { cursor: auto; }
}

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--rule);
}
.monogram {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem; letter-spacing: .02em;
  color: var(--text); text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--muted); background: transparent;
  border: 1px solid transparent;
  text-decoration: none; cursor: none;
  transition: color .2s, background .2s, border-color .2s;
}
.icon-btn:hover { color: var(--text); background: rgba(167,139,250,.08); border-color: var(--border); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* theme toggle — shows the icon of the mode you'd switch TO */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun  { display: block; }

.burger {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; gap: 4px;
  background: transparent; border: 1px solid transparent;
  cursor: none;
}
.burger:hover { background: rgba(167,139,250,.08); border-color: var(--border); }
.burger span {
  display: block; width: 17px; height: 1.5px; border-radius: 2px;
  background: var(--text);
  transition: transform .28s cubic-bezier(.23,1,.32,1), opacity .2s;
}
.burger span + span { margin-top: 4px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.menu {
  position: fixed; z-index: 299;
  top: calc(var(--nav-h) + 10px); right: var(--pad);
  width: min(260px, calc(100vw - 2 * var(--pad)));
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: .5rem;
  box-shadow: 0 20px 48px rgba(var(--shadow-rgb),.14);
  opacity: 0; transform: translateY(-8px) scale(.98);
  pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
body.menu-open .menu { opacity: 1; transform: none; pointer-events: auto; }
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem .75rem; border-radius: 10px;
  color: var(--dim); text-decoration: none;
  font-size: .85rem; transition: background .18s, color .18s;
}
.menu a:hover { background: rgba(167,139,250,.09); color: var(--text); }
.menu a span { font-size: .68rem; color: var(--muted); letter-spacing: .06em; }
.menu-sep { height: 1px; background: var(--rule); margin: .4rem .75rem; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 6.5rem 0; }
.section--panel { background: var(--panel); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section--deep  { background: var(--deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.eyebrow {
  font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::after {
  content: ''; display: block;
  width: 38px; height: 2px; border-radius: 2px;
  background: var(--grad); margin-top: .55rem;
}
.eyebrow--center { text-align: center; }
.eyebrow--center::after { margin-left: auto; margin-right: auto; }
.sec-head { margin-bottom: 3.25rem; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.5rem; border-radius: 999px;
  font-size: .88rem; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; cursor: none;
  transition: opacity .2s, transform .2s, background .2s, border-color .2s;
}
.btn:hover { opacity: .9; }
.btn-fill  { background: var(--accent); color: var(--on-accent); }
.btn-gold  { background: var(--gold-bright); color: var(--on-bright); }
.btn-soft  { background: rgba(167,139,250,.12); color: var(--text); border-color: var(--border-hi); }
.btn-soft:hover { background: rgba(167,139,250,.18); }
.btn-ghost { border-color: var(--rule); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-hi); }
.arr { transition: transform .18s; }
.btn:hover .arr, .link-arrow:hover .arr { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--accent); text-decoration: none;
  font-size: .87rem; font-weight: 500;
}
.link-arrow:hover { color: var(--gold); }

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 86vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 4rem) var(--pad) 5rem;
}
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto -10%; height: 120%;
  background:
    radial-gradient(ellipse 55% 45% at 50% 30%, rgba(167,139,250,.30), transparent 65%),
    radial-gradient(ellipse 40% 35% at 76% 62%, rgba(240,192,96,.26), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero-hi {
  font-size: 1rem; color: var(--dim); margin-bottom: .35rem;
}
.hero-name {
  font-family: 'DM Serif Display', serif;
  font-style: italic; font-weight: 400;
  font-size: clamp(3.2rem, 10vw, 6.4rem);
  line-height: 1.02; letter-spacing: -.01em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.4rem;
}
.hero-tag {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--dim); line-height: 1.55;
  max-width: 520px; margin: 0 auto 2.6rem;
}
.hero-btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-meta {
  position: absolute; bottom: 2.25rem; left: 0; right: 0;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); z-index: 1;
}

/* ── ABOUT ───────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 4.5rem; align-items: start;
}
.about-lead {
  font-size: 1.22rem; line-height: 1.65; color: var(--text);
  font-weight: 400; margin-bottom: 1.4rem;
}
.about-lead mark {
  background: rgba(167,139,250,.16);
  color: var(--text);
  padding: .1em .28em; border-radius: 5px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.about-body { color: var(--dim); line-height: 1.85; font-size: .97rem; }
.about-body + .about-body { margin-top: 1rem; }
.about-body strong { color: var(--text); font-weight: 500; }
.about-body a {
  color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: rgba(111,79,224,.35);
  transition: color .2s, text-decoration-color .2s;
}
.about-body a strong { color: inherit; }
.about-body a:hover { color: var(--gold); text-decoration-color: var(--gold); }

.stats-row {
  display: flex; gap: 2.75rem; flex-wrap: wrap;
  margin-top: 2.75rem; padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.stat-num {
  font-family: 'DM Serif Display', serif; font-style: italic;
  font-size: 2.1rem; line-height: 1; color: var(--text); margin-bottom: .3rem;
}
.stat-lbl { font-size: .78rem; color: var(--muted); max-width: 150px; line-height: 1.5; }

/* portrait */
.portrait-wrap { position: relative; padding-bottom: 2.5rem; }
.portrait {
  position: relative; aspect-ratio: 4/5; width: 100%;
  border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(111,79,224,.22);
  background:
    radial-gradient(120% 95% at 18% 0%, rgba(167,139,250,.40), transparent 62%),
    radial-gradient(115% 95% at 92% 100%, rgba(240,192,96,.42), transparent 62%),
    var(--card);
  box-shadow: 0 16px 40px rgba(var(--shadow-rgb),.08);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait img[hidden], .portrait-fallback[hidden] { display: none; }
.portrait-fallback { text-align: center; padding: 1.5rem; }
.portrait-fallback .pf-mono {
  font-family: 'DM Serif Display', serif; font-style: italic;
  font-size: clamp(3.5rem, 9vw, 5rem); line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.portrait-fallback .pf-note {
  margin-top: .6rem; font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}

.badge-pill {
  position: absolute; left: -.75rem; bottom: 1.5rem;
  background: var(--card-2); border: 1px solid var(--border-hi);
  border-radius: 14px; padding: .7rem 1rem;
  font-size: .82rem; font-weight: 500; line-height: 1.35;
  max-width: 190px;
  box-shadow: 0 14px 32px rgba(var(--shadow-rgb),.13);
}
.badge-round {
  position: absolute; right: -.5rem; bottom: .5rem;
  width: 104px; height: 104px; border-radius: 50%;
  background: var(--grad-fill); color: var(--on-bright);
  display: grid; place-items: center; text-align: center;
  box-shadow: 0 14px 32px rgba(var(--shadow-rgb),.16);
}
.badge-round b { font-size: 1.5rem; font-weight: 700; line-height: 1; display: block; }
.badge-round span {
  display: block; font-size: .52rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; margin-top: .25rem;
}

/* ── WORK CARDS ──────────────────────────────────────────── */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.work-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .28s cubic-bezier(.23,1,.32,1), border-color .25s, box-shadow .28s;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 18px 40px rgba(var(--shadow-rgb),.10);
}
.work-visual {
  position: relative; height: 210px; overflow: hidden;
  border-bottom: 1px solid var(--rule);
  display: grid; place-items: center; padding: 1.5rem;
}
/* full-bleed cover image instead of a CSS mock */
.work-visual--img { padding: 0; }
.work-visual--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.work-date { font-size: .72rem; color: var(--muted); letter-spacing: .06em; margin-top: .9rem; }
.work-kicker {
  font-size: .68rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .6rem;
}
.work-title {
  font-family: 'DM Serif Display', serif; font-size: 1.55rem;
  font-weight: 400; line-height: 1.15; margin-bottom: .7rem;
}
.work-desc { font-size: .9rem; color: var(--dim); line-height: 1.75; margin-bottom: 1.4rem; }
.work-card .link-arrow { margin-top: auto; }

/* card visuals (pure CSS mocks — no image assets needed) */
.mock {
  width: 100%; max-width: 300px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 12px; padding: .85rem; font-size: .62rem;
}
.mock-bar { display: flex; align-items: center; gap: .3rem; margin-bottom: .7rem; }
.mock-bar i { width: 6px; height: 6px; border-radius: 50%; background: var(--rule); display: block; }
.mock-bar b { margin-left: auto; color: var(--muted); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; font-size: .55rem; }
.mock-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .7rem; }
.mock-chips span {
  padding: .2rem .5rem; border-radius: 999px;
  background: rgba(167,139,250,.12); color: var(--accent);
  border: 1px solid var(--border);
}
.mock-line { height: 6px; border-radius: 3px; background: var(--rule); margin-bottom: .35rem; }
.mock-line.w70 { width: 70%; }
.mock-line.w45 { width: 45%; }
.mock-out {
  margin-top: .7rem; padding: .5rem .6rem; border-radius: 8px;
  background: rgba(240,192,96,.16); border: 1px solid rgba(176,127,12,.30);
  color: var(--gold); font-weight: 500;
}
.mock-funnel { display: flex; flex-direction: column; gap: .4rem; }
.mock-funnel div {
  height: 22px; border-radius: 6px; display: flex; align-items: center;
  padding: 0 .5rem; color: var(--on-bright); font-weight: 600;
}
.mock-kpi { display: flex; gap: .5rem; margin-top: .7rem; }
.mock-kpi div {
  flex: 1; border-radius: 8px; padding: .45rem .5rem;
  background: rgba(167,139,250,.08); border: 1px solid var(--border);
}
.mock-kpi b { display: block; color: var(--text); font-size: .82rem; font-family: 'DM Serif Display', serif; font-style: italic; }
.mock-kpi span { color: var(--muted); font-size: .55rem; }
.mock-svg { width: 100%; height: auto; display: block; }
.mock-paper {
  width: 100%; max-width: 250px; aspect-ratio: 5/4;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem; display: flex; flex-direction: column; gap: .35rem;
}
.mock-paper .t {
  height: 8px; width: 65%; border-radius: 3px; background: var(--grad-fill); margin-bottom: .35rem;
}
.mock-paper .r { height: 4px; border-radius: 2px; background: var(--rule); }
.mock-paper .r.s { width: 80%; }
.mock-paper .r.m { width: 92%; }

/* ── EXPERIENCE (accordion) ──────────────────────────────── */
.exp-list { border-top: 1px solid var(--rule); }
.exp {
  border-bottom: 1px solid var(--rule);
}
.exp > summary {
  list-style: none; cursor: none;
  display: grid; grid-template-columns: 180px 1fr 24px;
  gap: 1.5rem; align-items: start;
  padding: 1.6rem 0;
  transition: color .2s;
}
.exp > summary::-webkit-details-marker { display: none; }
.exp-date {
  font-size: .78rem; color: var(--muted); padding-top: .18rem; letter-spacing: .02em;
}
.exp-role { font-size: 1.02rem; font-weight: 500; color: var(--text); margin-bottom: .22rem; }
.exp-org  { font-size: .82rem; color: var(--muted); }
.exp-chev {
  width: 20px; height: 20px; margin-top: .25rem;
  color: var(--muted); transition: transform .3s cubic-bezier(.23,1,.32,1), color .2s;
}
.exp > summary:hover .exp-role { color: var(--accent); }
.exp > summary:hover .exp-chev { color: var(--accent); }
.exp[open] > summary .exp-chev { transform: rotate(180deg); color: var(--accent); }
.exp-detail { padding: 0 0 1.7rem; }
.exp-detail ul { list-style: none; display: grid; gap: .6rem; max-width: 720px; }
.exp-detail li {
  position: relative; padding-left: 1.1rem;
  font-size: .9rem; color: var(--dim); line-height: 1.75;
}
.exp-detail li::before {
  content: ''; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.exp-detail { animation: fadeUp .35s ease both; }
.exp-sub {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 2.75rem 0 .25rem;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* offset the summary grid so the detail lines up with the role column */
.exp-detail { padding-left: calc(180px + 1.5rem); }

/* ── EDUCATION ───────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.edu-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 2rem;
  transition: border-color .25s, transform .25s;
}
.edu-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.edu-school { font-family: 'DM Serif Display', serif; font-size: 1.5rem; margin-bottom: .35rem; }
.edu-prog { font-size: .9rem; color: var(--accent); margin-bottom: .3rem; }
.edu-meta { font-size: .78rem; color: var(--muted); margin-bottom: 1.4rem; }
.edu-list { list-style: none; display: grid; gap: .6rem; }
.edu-list li {
  position: relative; padding-left: 1.1rem;
  font-size: .88rem; color: var(--dim); line-height: 1.7;
}
.edu-list li::before {
  content: ''; position: absolute; left: 0; top: .6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}

/* ── SKILLS ──────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.skill-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.25rem; }
.skill-ico {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
  background: rgba(167,139,250,.12); border: 1px solid var(--border);
  color: var(--accent);
}
.skill-ico.gold { background: rgba(240,192,96,.20); color: var(--gold); border-color: rgba(176,127,12,.28); }
.skill-ico svg { width: 15px; height: 15px; fill: currentColor; }
.skill-head h3 {
  font-size: .76rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
}
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pill {
  padding: .45rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  font-size: .8rem; color: var(--dim);
  transition: border-color .2s, color .2s, background .2s;
}
.pill:hover { border-color: var(--border-hi); color: var(--text); background: var(--card-2); }

/* ── CONTACT CARD ────────────────────────────────────────── */
.card-contact {
  position: relative; overflow: hidden;
  max-width: 720px; margin: 0 auto;
  border-radius: 24px; padding: 2.75rem;
  background: var(--grad-fill); color: var(--on-bright);
  display: grid; grid-template-columns: 1fr auto; gap: 2.5rem; align-items: center;
  box-shadow: 0 24px 60px rgba(111,79,224,.22);
}
.card-contact h2 {
  font-family: 'DM Serif Display', serif; font-size: 2.1rem;
  font-weight: 400; line-height: 1.05;
}
.cc-rule { width: 46px; height: 3px; background: rgba(12,10,26,.5); border-radius: 2px; margin: .9rem 0 .8rem; }
.cc-role {
  font-size: .7rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(12,10,26,.72);
}
.cc-note { margin: 1.15rem 0 1.5rem; font-size: .95rem; line-height: 1.6; color: rgba(12,10,26,.86); }
.cc-btns { display: flex; flex-direction: column; gap: .65rem; align-items: flex-start; }
.cc-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.2rem; border-radius: 999px;
  border: 1.5px solid rgba(36,26,5,.38); color: var(--on-bright);
  text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: background .2s, border-color .2s;
}
.cc-btn:hover { background: rgba(12,10,26,.09); border-color: rgba(12,10,26,.6); }
.cc-btn svg { width: 15px; height: 15px; fill: currentColor; }
.cc-side {
  border-left: 2px dashed rgba(12,10,26,.28);
  padding-left: 2.5rem; text-align: center;
}
.cc-qr {
  display: block; width: 124px; height: 124px; border-radius: 20px;
  background: #fff; padding: 9px; margin: 0 auto .8rem;
  box-shadow: 0 6px 18px rgba(12,10,26,.18);
  transition: transform .3s ease, box-shadow .3s ease;
}
.cc-qr:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(12,10,26,.26); }
.cc-qr img { width: 100%; height: 100%; display: block; border-radius: 6px; }
.cc-side small {
  display: block; font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(12,10,26,.7);
}
.cc-loc { margin-top: .35rem; color: rgba(12,10,26,.5); }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem var(--pad);
  text-align: center;
}
footer p { font-size: .75rem; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ── PROJECT PAGES ───────────────────────────────────────── */
.p-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 5.5rem) 0 4.5rem;
}
.p-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto -10%; height: 140%;
  background: radial-gradient(ellipse 50% 50% at 30% 20%, rgba(167,139,250,.26), transparent 65%);
  pointer-events: none;
}
.p-hero .wrap { position: relative; z-index: 1; }
.back-link {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--muted); text-decoration: none; font-size: .82rem;
  margin-bottom: 2.25rem; transition: color .2s;
}
.back-link:hover { color: var(--text); }
.p-title {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05;
  margin: .7rem 0 1.1rem;
}
.p-sub { font-size: 1.1rem; color: var(--dim); line-height: 1.7; max-width: 620px; }
.p-meta {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 2.75rem; padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}
.p-meta div span {
  display: block; font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .3rem;
}
.p-meta div b { font-weight: 500; font-size: .92rem; color: var(--text); }

.prose { max-width: 720px; }
.prose h2 {
  font-family: 'DM Serif Display', serif; font-weight: 400;
  font-size: 1.6rem; margin-bottom: .9rem;
}
.prose h2 + p { margin-top: 0; }
.prose p { color: var(--dim); line-height: 1.9; font-size: .98rem; }
.prose p + p { margin-top: 1rem; }
.prose ul { list-style: none; display: grid; gap: .7rem; margin-top: 1rem; }
.prose ul + p { margin-top: 1.35rem; }   /* prose resuming after a bullet list */
.prose li { position: relative; padding-left: 1.15rem; color: var(--dim); line-height: 1.8; font-size: .95rem; }
.prose li::before {
  content: ''; position: absolute; left: 0; top: .68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.prose + .prose { margin-top: 3.25rem; }
.prose strong { color: var(--text); font-weight: 500; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.metric {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; padding: 1.75rem;
}
.metric b {
  display: block; font-family: 'DM Serif Display', serif; font-style: italic;
  font-size: 2.2rem; line-height: 1; margin-bottom: .5rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric span { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* ── PROJECT SHOTS ───────────────────────────────────────── */
.shots { margin: 3.25rem 0; }
.shots-frame {
  display: block;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 1.1rem;
  transition: border-color .35s ease, transform .35s ease;
}
a.shots-frame:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.shots-scroll { overflow-x: auto; border-radius: 10px; }
.shots-frame img { width: 100%; height: auto; display: block; border-radius: 10px; }
.shots figcaption {
  margin-top: .95rem; font-size: .82rem; color: var(--muted);
  line-height: 1.7; max-width: 720px;
}

/* Research figures (plots, diagrams) rather than app screenshots.
   They have white backgrounds, so they sit on a light plate that keeps
   them readable in dark mode instead of glaring against it. */
.shots--fig .shots-frame img {
  background: #fff; padding: .7rem;
}
.shots--fig .shots-frame { padding: .8rem; }
/* Tall figures would otherwise run past a full screen height. */
.shots--tall .shots-frame img { max-width: 760px; margin-inline: auto; }
/* Two figures side by side; stacks on narrow screens. */
.shots-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 760px) { .shots-pair { grid-template-columns: 1fr; } }

.next-nav {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 1.5rem;
  padding: 2.5rem 0; border-top: 1px solid var(--rule);
}
.next-nav span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: .3rem; }
.next-nav a { color: var(--text); text-decoration: none; font-family: 'DM Serif Display', serif; font-size: 1.3rem; }
.next-nav a:hover { color: var(--accent); }

/* ── REVEAL ──────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait-wrap { max-width: 380px; }
  .work-grid, .edu-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; gap: 2rem; }
  .metric-grid { grid-template-columns: 1fr; }
  .card-contact { grid-template-columns: 1fr; }
  .cc-side { border-left: none; border-top: 2px dashed rgba(12,10,26,.28); padding-left: 0; padding-top: 2rem; }
}
@media (max-width: 640px) {
  :root { --pad: 1.25rem; }
  .section { padding: 4.5rem 0; }
  /* keep the phone screens readable — scroll sideways instead of shrinking */
  .shots-frame img { width: auto; height: 330px; max-width: none; }
  /* figures are legible when scaled down, so let them fit instead */
  .shots--fig .shots-frame img { width: 100%; height: auto; }
  /* except wide multi-panel ones, which stay readable by scrolling sideways */
  .shots--wide .shots-frame img { width: auto; height: 300px; max-width: none; }
  .hero { min-height: 88vh; }
  .exp > summary { grid-template-columns: 1fr 24px; gap: .75rem; }
  .exp-date { grid-column: 1 / -1; color: var(--accent); padding-top: 0; margin-bottom: .3rem; }
  .exp-detail { padding-left: 0; }
  .card-contact { padding: 2rem 1.5rem; }
  .p-meta { gap: 1.5rem 2rem; }
  .stats-row { gap: 1.75rem; }
}
