/*!
 * Prasidha Jagtap — personal website
 * Designed & developed by Prasidha Jagtap · https://prasidhajagtap.github.io/prasidha_jagtap/
 * © 2026 Prasidha Jagtap. All rights reserved. Not licensed for reuse.
 */
/* Inter (SIL Open Font License), hosted with the site: no outside requests */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================
   Prasidha Jagtap — personal site
   Apple-style, light by default, optional dark mode (toggle).
   Uses only widely supported CSS, with fallbacks for older
   browsers and in-app browsers (LinkedIn, WhatsApp, Gmail…).
   ========================================================== */

/* ============ Colors ============ */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --card: #ffffff;
  --solid: #1d1d1f;      /* main button */
  --solid-text: #ffffff;
  --nav: rgba(255, 255, 255, 0.88);
  --nav-line: rgba(0, 0, 0, 0.08);
  --field: #ffffff;
  --dark-bg: #000000;
  --dark-text: #f5f5f7;
  --dark-muted: #a1a1a6;
}
/* Dark theme — only when the visitor turns it on with the toggle */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-alt: #111113;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: #333336;
  --card: #1c1c1e;
  --solid: #f5f5f7;
  --solid-text: #000000;
  --nav: rgba(22, 22, 23, 0.88);
  --nav-line: rgba(255, 255, 255, 0.1);
  --field: #1c1c1e;
  --dark-bg: #161617;
  --dark-text: #f5f5f7;
  --dark-muted: #a1a1a6;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 56px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
.modal-open, .modal-open body { overflow: hidden; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ Top menu ============ */
.nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--nav-line);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav { background: var(--bg); }
}
.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-weight: 600; font-size: 18px; }
.nav-right { display: flex; align-items: center; }
.nav ul { list-style: none; margin: 0 26px 0 0; padding: 0; display: flex; }
.nav ul li + li { margin-left: 26px; }
.nav ul a { font-size: 13px; color: var(--muted); transition: color .2s; }
.nav ul a:hover { color: var(--text); }

.icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  transition: background .2s;
}
.icon-btn:hover { background: var(--bg-alt); }
.icon-btn svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; margin-left: 10px; }

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding: 96px 22px 0;
  max-width: 980px;
  margin: 0 auto;
}
.eyebrow { margin: 0 0 8px; font-size: 21px; font-weight: 600; color: var(--muted); }
h1 {
  font-size: 56px;
  font-size: clamp(44px, 9vw, 96px);
  font-weight: 700;
  line-height: 1.04;
}
.lead {
  margin: 18px auto 0;
  max-width: 640px;
  font-size: 21px;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.35;
  color: var(--muted);
}
.actions {
  margin: 30px -12px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.actions > * { margin: 7px 12px; }
.portrait {
  margin: 64px auto 0;
  max-width: 520px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-alt);
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* keeps rounded corners on old Safari */
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  border: 1px solid transparent;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .2s, opacity .2s, background .2s;
}
.btn:hover { transform: scale(1.03); }
.btn-solid { background: var(--solid); color: var(--solid-text); }
.btn-invert { background: var(--dark-text); color: var(--dark-bg); }
.btn-ghost { border-color: var(--dark-muted); color: var(--dark-text); }
.btn-block { display: block; width: 100%; }
.btn-block:hover { transform: none; opacity: .88; }
.btn-small { padding: 8px 16px; font-size: 15px; background: var(--solid); color: var(--solid-text); }
.btn[data-resume]:not(.is-ready) { display: none; }  /* shown by script once the PDF exists */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

/* ============ Sections ============ */
.section { padding: 120px 0; }
.alt { background: var(--bg-alt); }
.kicker {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
h2 {
  font-size: 44px;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 56px;
}
.statement {
  margin: 0;
  font-size: 32px;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--muted);
}
.statement strong { color: var(--text); font-weight: 600; }
.org { margin: 4px 0 0; color: var(--muted); }

/* ============ Chips ============ */
.chips { list-style: none; margin: -5px; padding: 0; display: flex; flex-wrap: wrap; }
.chips li {
  margin: 5px;
  padding: 8px 16px;
  border-radius: 980px;
  background: var(--card);
  font-size: 15px;
  font-weight: 500;
}

/* ============ At a glance ============ */
.stats-band { padding: 96px 0 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 40px 24px;
  gap: 40px 24px;
  text-align: center;
}
.stat span { max-width: 240px; margin-left: auto !important; margin-right: auto !important; }
.stat strong {
  display: block;
  font-size: 36px;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ============ Experience ============ */

.role { background: var(--card); border-radius: 24px; padding: 40px; }
.role + .role { margin-top: 40px; }
.role-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.role-head > div { margin-right: 16px; }
.role-head h3 { font-size: 28px; font-weight: 600; }
.alt .role .chips li { background: var(--bg-alt); }
h4.kicker { margin-bottom: 14px; }

/* ============ Moments (photo row, equal heights) ============ */

/* ============ Back to top ============ */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 30;
  width: 44px;
  height: 44px;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s, background .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 18px; height: 18px; }
.modal-open .to-top { display: none; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .to-top { background: var(--bg); }
}

/* ============ v5: case studies, AI, certifications ============ */
.section-lead { margin: -32px 0 40px; max-width: 640px; font-size: 21px; line-height: 1.4; color: var(--muted); }
.case h3 { font-size: 22px; line-height: 1.25; }
.case .result {
  margin-top: auto;
  padding-top: 16px;
  color: var(--text);
  font-size: 15px;
}
.case { display: flex; flex-direction: column; }
.case > p:not(.status):not(.result) { margin-bottom: 4px; }
.case .result strong { font-weight: 700; }
.earlier { margin-top: 40px; }
.earlier .row h3 { font-size: 20px; }
.earlier .kicker { margin-bottom: 4px; }
.certs { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 20px; gap: 20px; }
.cert-group { background: var(--card); border-radius: 24px; padding: 32px 36px; }
.cert-group h3 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.cert-group ul { list-style: none; margin: 0; padding: 0; }
.cert-group li { padding: 12px 0; border-top: 1px solid var(--line); }
.cert-group li:first-child { border-top: 0; }
.cert-group li strong { display: block; font-weight: 600; font-size: 16px; line-height: 1.35; }
.cert-group li span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* ============ Cards (projects & skills) ============ */
.card {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 36px;
  transition: transform .3s;
}
.alt .card { background: var(--card); }
.card:hover { transform: translateY(-4px); }
.card h3 { font-size: 24px; font-weight: 600; }
.card p { margin: 10px 0 0; color: var(--muted); }
.status {
  margin: 0 0 8px !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stack {
  list-style: none;
  margin: auto -3px 0;
  padding: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
}
.stack li {
  margin: 3px;
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 980px;
  color: var(--muted);
}
.more { margin-top: 14px; font-weight: 500; }
.more:hover { text-decoration: underline; }

/* ============ Education rows ============ */
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.row > div { margin-right: 16px; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row h3 { font-size: 24px; font-weight: 600; }
.year { color: var(--muted); white-space: nowrap; }

/* ============ Contact (inverted block) ============ */
.dark { background: var(--dark-bg); color: var(--dark-text); }
.dark .lead { color: var(--dark-muted); }
.big { font-size: 56px; font-size: clamp(44px, 9vw, 96px); margin-bottom: 0; }

/* ============ Footer ============ */
.footer { padding: 28px 0; font-size: 12px; color: var(--muted); background: var(--bg-alt); }
.footer p { margin: 0; }

/* ============ Contact form (modal) ============ */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }   /* top/height follow the visible area (main.js) */
.modal-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.45); }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--card);
  color: var(--text);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-card h2 { font-size: 28px; margin: 0 40px 8px 0; }
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-note { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
#contact-form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
#contact-form .optional { font-weight: 400; color: var(--muted); }
#contact-form input, #contact-form select, #contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font-size: 16px;               /* 16px stops iPhone from zooming in */
  font-weight: 400;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  -webkit-appearance: none;
  appearance: none;
}
#contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
#contact-form textarea { resize: vertical; min-height: 110px; }
#contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 12px; color: #d70015; font-size: 14px; }
.fallback { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.fallback p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.copy-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.email-out { margin: 4px 12px 4px 0; font-weight: 600; word-break: break-all; -webkit-user-select: all; user-select: all; }

/* "Want a website of your own?" — a glowing pill under the contact buttons that keeps
   inviting a click: a light streak sweeps across it (every 3 s) and a blue ring ripples
   out from it (every 2.4 s). Hover / press settles it; no motion for reduced-motion users. */
.build-cta {
  position: relative; display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 11px 20px;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--dark-text);
  border-radius: 980px; border: 1px solid rgba(98, 174, 248, 0.7);
  background:
    linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.32) 50%, transparent 60%) no-repeat,
    linear-gradient(180deg, rgba(98, 174, 248, 0.24), rgba(28, 104, 216, 0.2));
  background-size: 250% 100%, 100% 100%;
  background-position: 150% 0, 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 22px rgba(28, 104, 216, 0.35);
  animation: cta-shine 3s ease-in-out infinite;
  transition: transform .2s, box-shadow .2s;
}
.build-cta::after {
  content: ""; position: absolute; top: -1px; right: -1px; bottom: -1px; left: -1px; border-radius: inherit; pointer-events: none;
  animation: cta-ripple 2.4s cubic-bezier(.2, .7, .3, 1) infinite;
}
@keyframes cta-shine { 0% { background-position: 150% 0, 0 0; } 45%, 100% { background-position: -50% 0, 0 0; } }
@keyframes cta-ripple {
  0%       { box-shadow: 0 0 0 0 rgba(98, 174, 248, 0.6); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(98, 174, 248, 0); }
}
.build-cta svg { width: 18px; height: 18px; color: #62aef8; }
.build-cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 30px rgba(28, 104, 216, 0.5); }
.build-cta:active { transform: translateY(1px); }
.build-cta:hover::after, .build-cta:focus-visible::after, .build-cta:active::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .build-cta, .build-cta::after { animation: none; } }
.mail-preview { margin: 0 0 20px; padding: 16px 18px; border-radius: 16px; background: var(--field); border: 1px solid var(--line); box-shadow: var(--sh-inset, none); font-size: 15px; }
.mail-row { display: flex; gap: 10px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mail-row span { flex: 0 0 58px; color: var(--muted); }
.mail-body { margin: 12px 0 0; white-space: pre-line; line-height: 1.5; }
.mail-alt { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.mail-alt a { color: #1c68d8; font-weight: 600; }
[data-theme="dark"] .mail-alt a { color: #62aef8; }

/* "Too many requests" message (shown only when the database's spam guard says 'limit') */
.spam-stop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.spam-card { width: 100%; max-width: 400px; padding: 30px 26px 26px; border-radius: 24px; text-align: center;
  background: var(--card); color: var(--text); box-shadow: var(--edge), 0 24px 60px rgba(0, 0, 0, 0.35); animation: fb-soft .3s var(--ease-out) both; }
.spam-light { font-size: 52px; line-height: 1; }
.spam-card h2 { margin: 14px 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.spam-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.45; }
.spam-card .btn { min-width: 140px; }
body.spam-closed { min-height: 100vh; display: flex; align-items: center; justify-content: center; margin: 0; background: var(--bg); color: var(--text); font-size: 20px; font-weight: 600; }

/* ============ Scroll fade-in ============ */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .nav, .modal { display: none !important; }
}

/* ============ Phone ============ */
@media (max-width: 734px) {
  body { font-size: 16px; }
  .wrap, .nav-inner { padding: 0 16px; }
  .menu-toggle { display: flex; }
  .nav ul {
    display: none;
    position: absolute;
    top: 48px; left: 0; right: 0;
    flex-direction: column;
    margin: 0;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }
  .nav.open ul { display: flex; }
  .nav ul li + li { margin-left: 0; }
  .nav ul a { display: block; padding: 12px 0; font-size: 17px; color: var(--text); }
  .hero { padding: 64px 16px 0; }
  .eyebrow { font-size: 16px; }
  .portrait { margin-top: 44px; border-radius: 20px; }
  .section { padding: 80px 0; }
  h2 { margin-bottom: 36px; }
  .card { padding: 28px; }
  .row h3 { font-size: 20px; }
  .stats-band { padding-top: 64px; }
  .stats { grid-template-columns: repeat(2, 1fr); grid-gap: 32px 16px; gap: 32px 16px; }
  .role-head h3 { font-size: 24px; }
  .role { padding: 26px 20px; border-radius: 20px; }
  .certs { grid-template-columns: 1fr; }
  .cert-group { padding: 24px 20px; border-radius: 20px; }
  .section-lead { margin-top: -20px; font-size: 18px; }
  .modal { padding: 12px; }
  .modal-card { padding: 26px 20px 24px; border-radius: 22px; }
}

/* ============ Wide screens: use more of the page ============ */
@media (min-width: 1001px) {
  .wrap, .nav-inner { max-width: 1200px; }
  .narrow { max-width: 880px; }
  .hero {
    max-width: 1200px;
    padding: 72px 22px 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-gap: 64px;
    gap: 64px;
    align-items: center;
    text-align: left;
  }
  .hero h1 { font-size: clamp(64px, 7vw, 108px); }
  .hero .lead { margin-left: 0; max-width: 560px; }
  .hero .actions { justify-content: flex-start; }
  .hero .portrait { margin: 0; max-width: none; }
  .stats-band { padding-top: 110px; }
}

/* ============ v7: social media block, collapsible highlights ============ */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 16px;
  gap: 16px;
  margin-top: 28px;
}
.mini-stats div { background: var(--bg-alt); border-radius: 18px; padding: 20px 22px; }
.mini-stats strong { display: block; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.mini-stats span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

@media (max-width: 734px) {
  .mini-stats { grid-template-columns: 1fr; }
}

/* ==========================================================
   macOS-style animations (buttons & controls only; layout unchanged)
   ========================================================== */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* Buttons: gentle lift on hover, press down and spring back on click */
.btn { transition: transform .45s var(--spring), opacity .2s, background .2s, box-shadow .3s; }
.btn:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.btn:active { transform: scale(.94); box-shadow: none; transition-duration: .08s; }
.btn-block:hover { transform: none; }
.btn-block:active { transform: scale(.97); }

/* "Get in touch ›" arrow nudges forward */

/* Round icon buttons (theme, menu, back to top) */
.icon-btn { transition: transform .45s var(--spring), background .2s, box-shadow .3s; }
.icon-btn:hover { transform: scale(1.1); }
.icon-btn:active { transform: scale(.86); transition-duration: .08s; }

/* Sun / moon flips in with a spring when the theme changes */
.theme-toggle svg { animation: icon-flip .6s var(--spring); }
@keyframes icon-flip {
  from { transform: rotate(-120deg) scale(.4); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Back-to-top pops in like a macOS notification */
.to-top { transform: translateY(16px) scale(.6); transition: opacity .3s ease, transform .5s var(--spring), visibility .3s, background .2s; }
.to-top.show { transform: none; }
.to-top.show:hover { transform: scale(1.1); }
.to-top.show:active { transform: scale(.86); transition-duration: .08s; }

/* "Key highlights" button: springy press, smooth open */

/* Cards lift with a spring */
.card { transition: transform .5s var(--spring), box-shadow .3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08); }

/* Contact form zooms in like a macOS sheet */
.modal:not([hidden]) .modal-card { animation: sheet-zoom .45s var(--spring); }
.modal:not([hidden]) .modal-backdrop { animation: fade-in .25s ease; }
@keyframes sheet-zoom {
  from { opacity: 0; transform: scale(.88) translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Menu links underline slides in */
.nav ul a { position: relative; }
@media (min-width: 735px) {
  .nav ul a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
    background: currentColor; transform: scaleX(0); transform-origin: left;
    transition: transform .35s var(--spring);
  }
  .nav ul a:hover::after { transform: scaleX(1); }
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active, .icon-btn:hover, .icon-btn:active, .card:hover, .to-top, .to-top.show:hover { transform: none !important; }
  .theme-toggle svg, .modal:not([hidden]) .modal-card, .modal:not([hidden]) .modal-backdrop { animation: none !important; }
}

/* ============ Header links behave like buttons on hover ============ */
.nav ul li + li { margin-left: 4px; }
.nav ul a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 980px;
  transition: background-color .25s ease, color .2s, transform .45s var(--spring), box-shadow .3s;
}
.nav ul a::after { display: none !important; }   /* replaces the thin underline */
.nav ul a:hover {
  color: var(--text);
  background: rgba(127, 127, 127, 0.12);
  transform: translateY(-1px) scale(1.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.nav ul a:active { transform: scale(.93); transition-duration: .08s; }
.nav ul a.current { color: var(--text); background: rgba(127, 127, 127, 0.1); }
.brand { display: inline-block; transition: transform .45s var(--spring); }
.brand:hover { transform: scale(1.05); }
.brand:active { transform: scale(.95); transition-duration: .08s; }
@media (max-width: 734px) {
  .nav ul li + li { margin-left: 0; }
  .nav ul a { display: block; padding: 12px 14px; border-radius: 12px; }
  .nav ul a:hover { transform: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav ul a:hover, .nav ul a:active, .brand:hover, .brand:active { transform: none !important; }
}

/* Photo-row ratios as classes (no inline styles, for the security policy) */

/* ==========================================================
   Readability & spacing: sizes adapt to every screen (default zoom)
   ========================================================== */
:root { --muted: #5f6066; }                        /* a little darker grey text = easier to read */
:root[data-theme="dark"] { --muted: #b0b0b6; }
.section { padding: clamp(56px, 7vw, 96px) 0; }
h2 { margin-bottom: clamp(24px, 3.2vw, 44px); }
.stats-band { padding-top: clamp(40px, 5vw, 72px); }
.stat span { font-size: 15px; }
.chips li { font-size: 15px; }
.card p, .org { font-size: 16.5px; line-height: 1.55; }
.footer { font-size: 13px; }
.earlier { margin-top: 32px; }
.role + .role { margin-top: 28px; }
.statement { line-height: 1.25; }

@media (min-width: 1001px) {
  .hero { padding-top: 56px; }
}
@media (min-width: 1440px) {
  body { font-size: 18px; }
  .wrap, .nav-inner, .hero { max-width: 1260px; }
  .card p, .org { font-size: 17.5px; }
  .stat span { font-size: 16px; }
}
/* Tablets: a single leftover card fills the whole row instead of leaving a gap */
@media (min-width: 735px) and (max-width: 1000px) {
  .hero { padding-top: 48px; }
}
@media (max-width: 734px) {
  .section { padding: 56px 0; }
  .hero { padding-top: 40px; }
  .portrait { margin-top: 32px; }
  .card, .cert-group { padding: 22px 20px; }
  .role { padding: 22px 18px; }
  .card p, .org { font-size: 16px; }
  .statement { font-size: 23px; }
  h2 { font-size: 32px; }
  .big { font-size: 44px; }
}
.section-lead { margin: -8px 0 clamp(24px, 3.5vw, 40px); }

/* Social media block: two stats + skill tags; awards app skill tags */
.mini-stats.two { grid-template-columns: repeat(2, minmax(0, 260px)); }
.case .stack { margin: 6px -3px 0; padding-top: 6px; }
.case > p strong { color: var(--text); }
@media (max-width: 734px) { .mini-stats.two { grid-template-columns: 1fr 1fr; } }

/* ==========================================================
Stacked chapters (accordion), journey, Cover Flow, tabs
   ========================================================== */
:root { --ipod: linear-gradient(180deg, #62aef8 0%, #3386ee 48%, #1c68d8 100%); --ipod-solid: #1c68d8; --ease-out: cubic-bezier(.2, .8, .2, 1); }

/* ---------- Accordion with an iPod-style selection bar ---------- */
.stack-acc { display: flex; flex-direction: column; }
.acc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.acc + .acc { margin-top: 12px; }
.acc-h { margin: 0; font-size: inherit; letter-spacing: normal; }
.acc-btn {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.acc-btn::before {                         /* a soft grey "selected" bar slides in from the left */
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(127, 127, 127, 0.1);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease-out);
}
.acc-btn > * { position: relative; z-index: 1; }
.acc:not(.open) .acc-btn:hover { background: rgba(127, 127, 127, 0.07); }
.acc.open .acc-btn::before { transform: scaleX(1); }
.acc.open .acc-num { color: var(--text); }
.acc-btn:active { transform: scale(.995); }
.acc-num { width: 40px; flex: none; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .3s; }
.acc-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.acc-title { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.acc-sub { margin-top: 2px; font-size: 14px; color: var(--muted); transition: color .3s; }
.acc-chev { width: 22px; height: 22px; flex: none; margin-left: 12px; transition: transform .5s var(--spring); }
.acc.open .acc-chev { transform: rotate(90deg); }

.acc-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .55s var(--ease-out); }
.acc-inner { min-height: 0; overflow: hidden; padding: 0 24px; }
.acc-inner > :first-child { margin-top: 24px; }
.acc-inner > :last-child { margin-bottom: 28px; }
/* Content slides in from the right, like an iPod menu */
.acc-inner > * { transition: transform .55s var(--ease-out) .08s, opacity .45s ease .08s; }
.js .acc:not(.open) .acc-panel { grid-template-rows: 0fr; }
.js .acc:not(.open) .acc-inner { visibility: hidden; transition: visibility 0s .55s; }
.js .acc:not(.open) .acc-inner > * { transform: translateX(48px); opacity: 0; transition-delay: 0s; }

/* ---------- Journey timeline: fills on scroll, "now" keeps pulsing ---------- */
.journey2 {
  list-style: none;
  position: relative;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.journey2::before, .journey2::after {
  content: "";
  position: absolute;
  top: 9px; left: 10%;
  height: 3px;
  border-radius: 3px;
}
.journey2::before { right: 10%; background: var(--line); }
.journey2::after { width: 0; background: var(--ipod); transition: width 2.4s var(--ease-out); }
.journey2.run::after { width: 80%; }
.journey2 li { position: relative; padding: 32px 8px 0; text-align: center; }
.j-dot {
  position: absolute; top: 2px; left: 50%;
  width: 17px; height: 17px;
  margin-left: -8.5px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--line);
  transition: background .35s, border-color .35s, transform .5s var(--spring);
}
.j-year, .j-label, .j-org { display: block; transition: opacity .5s; }
.j-year { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.j-label { margin-top: 4px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.j-org { margin-top: 2px; font-size: 13px; color: var(--muted); }
.js .journey2:not(.run) .j-year, .js .journey2:not(.run) .j-label, .js .journey2:not(.run) .j-org { opacity: .35; }
.journey2.run .j-dot { background: var(--ipod-solid); border-color: var(--ipod-solid); transform: scale(1.12); }
.journey2 li:nth-child(1) .j-dot, .journey2 li:nth-child(1) span { transition-delay: .15s; }
.journey2 li:nth-child(2) .j-dot, .journey2 li:nth-child(2) span { transition-delay: .7s; }
.journey2 li:nth-child(3) .j-dot, .journey2 li:nth-child(3) span { transition-delay: 1.25s; }
.journey2 li:nth-child(4) .j-dot, .journey2 li:nth-child(4) span { transition-delay: 1.8s; }
.journey2 li:nth-child(5) .j-dot, .journey2 li:nth-child(5) span { transition-delay: 2.35s; }
.journey2.run .j-now .j-dot { animation: j-pulse 1.8s ease-out 2.6s infinite; }
.j-now .j-year { color: var(--ipod-solid); }
@keyframes j-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(28, 104, 216, 0.55); }
  100% { box-shadow: 0 0 0 16px rgba(28, 104, 216, 0); }
}

/* ---------- Current role card + "Know more" ---------- */
.current-role { background: var(--bg-alt); border: 0; box-shadow: none; }
.role-name { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.mini-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.current-role .mini-stats div { background: var(--card); }
.know-more { display: inline-flex; align-items: center; margin-top: 24px; }
.know-more svg { width: 18px; height: 18px; margin-left: 8px; transition: transform .45s var(--spring); }
.know-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .55s var(--ease-out); }
.js .more-panel:not(.open) { grid-template-rows: 0fr; }
.more-inner { min-height: 0; overflow: hidden; }
.js .more-panel:not(.open) .more-inner { visibility: hidden; transition: visibility 0s .55s; }
.more-inner h5 { margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.more-inner h5.kicker { font-size: 14px; margin: 8px 0 14px; }
.more-inner .earlier { margin-top: 28px; }
.more-inner .earlier h4 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.current-role .chips li { background: var(--card); }

/* ---------- Problems solved as stacked cards ---------- */
.case h4 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.acc .card { background: var(--bg-alt); border: 0; box-shadow: none; }

/* ---------- Cover Flow (Moments) ---------- */
.coverflow { padding-top: 8px; }
.cf-stage { display: flex; justify-content: center; }
.cf-item { margin: 0 8px; }
.cf-item img { border-radius: 14px; }
.js .cf-stage {
  position: relative;
  display: block;
  height: clamp(230px, 34vw, 380px);
  perspective: 1100px;
}
.js .cf-item {
  position: absolute;
  top: 0; left: 50%;
  width: clamp(210px, 30vw, 350px);
  aspect-ratio: 1;
  margin: 0;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .65s var(--ease-out), opacity .65s, filter .65s;
  -webkit-box-reflect: below 6px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.22));
}
.js .cf-item img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22); }
.js .cf-item figcaption { display: none; }
.cf-site img { object-position: 50% 62%; }
.cf-summit img { object-position: 50% 45%; }
.cf-item figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); }
.cf-caption { min-height: 3.2em; max-width: 560px; margin: 44px auto 6px; text-align: center; font-size: 16px; color: var(--muted); }
.cf-caption strong { color: var(--text); }
.cf-controls { display: none; }
.js .cf-controls { display: flex; align-items: center; justify-content: center; }
.cf-dots { display: flex; margin: 0 14px; }
.cf-dots button { width: 8px; height: 8px; margin: 0 4px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .3s, transform .3s var(--spring); }
.cf-dots button[aria-current="true"] { background: var(--text); transform: scale(1.3); }
/* pause / play for the self-playing carousels */
.cf-play { margin-left: 10px; }
.cf-play svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.cf-play .i-play, .is-stopped .cf-play .i-pause { display: none; }
.is-stopped .cf-play .i-play { display: block; }

/* ---------- Certifications & Education (inside the stack) ---------- */
.edu { margin-bottom: 28px; }
.edu h4, .cert-group h4 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.cert-group h4 { margin-bottom: 8px; }
.acc .cert-group { background: var(--bg-alt); border: 0; box-shadow: none; }

/* ---------- AI & things I've built ---------- */

/* ---------- Skills tabs ---------- */
.tab-list {
  display: flex;
  max-width: 100%;
  width: -webkit-fit-content; width: fit-content;
  margin-bottom: 20px;
  padding: 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 980px;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-list [role="tab"] {
  flex: none;
  padding: 10px 18px;
  border: 0;
  border-radius: 980px;
  background: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .3s, color .2s, transform .4s var(--spring), box-shadow .3s;
}
.tab-list [role="tab"]:hover { color: var(--text); background: rgba(127, 127, 127, 0.1); }
.tab-list [role="tab"]:active { transform: scale(.94); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--solid); color: var(--solid-text); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14); }
.tab-panel {
  padding: clamp(22px, 3vw, 34px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  animation: tab-in .5s var(--spring);
}
.tab-panel h3 { margin: 0 0 8px; font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.02em; }
.tab-panel > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 760px; }
.tab-panel .chips { margin-top: 16px; }
.tab-panel .chips li { background: var(--bg-alt); }
.tab-panel .mini-stats { margin-top: 20px; }
.tab-panel .mini-stats div { background: var(--bg-alt); }
@keyframes tab-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- LinkedIn prompt ---------- */

/* ---------- Responsive ---------- */
@media (max-width: 734px) {
  .acc-btn { padding: 16px 16px; }
  .acc-num { width: 30px; font-size: 13px; }
  .acc-inner { padding: 0 14px; }
  .journey2 { grid-template-columns: 1fr; }
  .journey2::before, .journey2::after { top: 10px; left: 8px; width: 3px; height: auto; right: auto; }
  .journey2::before { bottom: 12px; }
  .journey2::after { height: 0; transition: height 2.4s var(--ease-out); }
  .journey2.run::after { width: 3px; height: calc(100% - 22px); }
  .journey2 li { padding: 0 0 20px 34px; text-align: left; }
  .j-dot { left: 1px; margin-left: 0; }
  .role-name { font-size: 22px; }
  .mini-stats.three { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .mini-stats.three div { padding: 14px 12px; }
  .mini-stats.three strong { font-size: 22px; }
  .mini-stats.three span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .acc-panel, .more-panel, .acc-inner > *, .acc-btn::before, .journey2::after, .j-dot, .js .cf-item { transition: none !important; }
  .journey2.run .j-now .j-dot, .tab-panel { animation: none !important; }
}
.js .cf-item picture { height: 100%; }
.js .cf-item { overflow: visible; }
/* Phone timeline: line drawn as segments between dots, so it ends exactly at 2026 */
@media (max-width: 734px) {
  .journey2::before, .journey2::after { display: none; }
  .journey2 li:not(:last-child)::before,
  .journey2 li:not(:last-child)::after {
    content: ""; position: absolute; left: 8px; top: 17px; bottom: -2px; width: 3px; border-radius: 3px;
  }
  .journey2 li:not(:last-child)::before { background: var(--line); }
  .journey2 li:not(:last-child)::after { background: var(--ipod-solid); transform: scaleY(0); transform-origin: top; transition: transform .55s var(--ease-out); }
  .journey2.run li:not(:last-child)::after { transform: scaleY(1); }
  .journey2 li:nth-child(1)::after { transition-delay: .2s; }
  .journey2 li:nth-child(2)::after { transition-delay: .75s; }
  .journey2 li:nth-child(3)::after { transition-delay: 1.3s; }
  .journey2 li:nth-child(4)::after { transition-delay: 1.85s; }
  .j-dot { z-index: 1; }
}
.js .cf-item { -webkit-box-reflect: below 6px linear-gradient(transparent 80%, rgba(255, 255, 255, 0.2)); }
.cf-caption { margin-top: 60px; }

/* ==========================================================
iPod-style Cover Flow (tight side stacks)
no black screen: sits on the page, cards float on drop shadows
   ========================================================== */
.cf-dark {
  position: relative;
  padding: 30px 0 20px;
  overflow: hidden;
  color: var(--text);
  background: none;
  /* side items fade out softly at the edges instead of being cut */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.js .cf-dark .cf-stage { perspective: 900px; }
.cf-dark .cf-caption { margin: 34px auto 4px; padding: 0 16px; font-size: 15px; }
.cf-dark .cf-controls { margin-top: 6px; }
.cf-dark .icon-btn:disabled { opacity: .3; cursor: default; transform: none; }
.js .cf-dark .cf-item { transition: transform .6s var(--ease-out), filter .6s, opacity .6s; }

/* Photos (Moments) */
.js .cf-photos .cf-stage { height: clamp(210px, 29vw, 340px); }
.js .cf-photos .cf-item { width: clamp(200px, 28vw, 330px); -webkit-box-reflect: below 4px linear-gradient(transparent 80%, rgba(255, 255, 255, 0.18)); }
.js .cf-photos .cf-item img { border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 16px 36px rgba(0, 0, 0, 0.18); }

/* Cards (Problems solved, Things I've made) — like album art */
.cf-cards .cf-stage { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-gap: 16px; gap: 16px; padding: 0 20px; }
.js .cf-cards .cf-stage { display: block; padding: 0; height: clamp(400px, 34vw, 430px); }
.js .cf-cards .cf-item {
  width: clamp(260px, 30vw, 340px);
  height: clamp(390px, 33vw, 420px);
  aspect-ratio: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 14px 34px rgba(0, 0, 0, 0.12);
  -webkit-box-reflect: below 4px linear-gradient(transparent 88%, rgba(255, 255, 255, 0.1));
}
.cf-cards .cf-item, .acc .cf-cards .card { background: var(--card); color: var(--text); }
:root:not([data-theme="dark"]) .cf-cards .cf-item { background: #fff; }
.cf-cards .cf-item h4 { font-size: 19px; }
.cf-cards .cf-item p { font-size: 15px; line-height: 1.5; }
.cf-cards .cf-item .status { font-size: 11px; }
.cf-cards .cf-item .stack li { font-size: 11px; padding: 2px 8px; }
.cf-cards .cf-item .result { font-size: 14px; }
.cf-cards .cf-item[aria-hidden="true"] { cursor: pointer; }
.cf-cards .cf-item:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 20px 44px rgba(0, 0, 0, 0.16); }
/* Dark mode: shadows need more depth, plus a faint edge so cards stand off the black page */
[data-theme="dark"].js .cf-cards .cf-item { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.7); }
[data-theme="dark"].js .cf-photos .cf-item img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.7); }

@media (max-width: 734px) {
  .cf-dark { border-radius: 18px; padding-top: 22px; }
  .js .cf-photos .cf-item { width: 60vw; }
  .js .cf-photos .cf-stage { height: calc(60vw + 6px); }
  .js .cf-cards .cf-item { width: 74vw; height: 470px; padding: 22px 20px; }
  .js .cf-cards .cf-stage { height: 480px; }
}
@media (min-width: 735px) and (max-width: 1000px) {
  .js .cf-cards .cf-item { width: 340px; height: 440px; }
  .js .cf-cards .cf-stage { height: 450px; }
}
@media (max-width: 734px) {
  .js .cf-cards .cf-item { height: 490px; }
  .js .cf-cards .cf-stage { height: 500px; }
}
@media (min-width: 1001px) {
  .js .cf-cards .cf-item { width: clamp(310px, 29vw, 340px); height: clamp(440px, 34vw, 450px); }
  .js .cf-cards .cf-stage { height: clamp(450px, 35vw, 460px); }
}
@media (max-width: 380px) {
  .js .cf-cards .cf-item { width: 80vw; height: 540px; }
  .js .cf-cards .cf-stage { height: 550px; }
}
@media (min-width: 1001px) {
  .js .cf-cards .cf-item { width: clamp(320px, 29vw, 340px); height: 460px; }
  .js .cf-cards .cf-stage { height: 470px; }
}

/* ==========================================================
tagline next to the name in the top menu
   ========================================================== */
.brand {
  display: -webkit-inline-box; display: inline-flex; align-items: center;
  min-width: 0; line-height: 1; transform-origin: left center;
}
.brand:hover { transform: scale(1.03); }
.brand-name { font-weight: 600; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.brand-tag {
  display: flex; flex-direction: column; min-width: 0;
  margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line);
  white-space: nowrap;
}
.bt-1 { font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; color: var(--text); }
.bt-2 { font-size: 11px; font-weight: 400; line-height: 1.3; color: var(--muted); }
.bt-2 .nw { white-space: nowrap; }

/* Middle widths: the links move into the menu button so the tagline has room */
@media (min-width: 735px) and (max-width: 1023px) {
  .menu-toggle { display: flex; }
  .nav ul {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; margin: 0; padding: 8px 22px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }
  .nav.open ul { display: flex; }
  .nav ul li + li { margin-left: 0; }
  .nav ul a { display: block; padding: 12px 14px; border-radius: 12px; font-size: 17px; color: var(--text); }
  .nav ul a:hover { transform: none; box-shadow: none; }
}

/* Phone: name on top, tagline under it, sized to the screen */
@media (max-width: 734px) {
  html { scroll-padding-top: 76px; }
  .nav-inner { height: auto; min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
  .nav ul { top: 100%; }
  .brand { flex-direction: column; align-items: flex-start; flex: 1 1 auto; margin-right: 10px; }
  .brand-name { font-size: 17px; }
  .brand-tag { margin: 4px 0 0; padding: 0; border: 0; max-width: 100%; }
  .bt-1 { font-size: clamp(10.5px, 3vw, 12px); }
  .bt-2 { font-size: clamp(9px, 2.6vw, 11px); white-space: normal; }
}

/* ==========================================================
profile picture in the header after the big photo
   ========================================================== */
.brand-pic {
  display: block; flex: none; align-self: center;
  width: 0; height: 30px; margin-right: 0;
  border-radius: 50%; overflow: hidden; opacity: 0;
  transform: scale(.3) translateY(10px);
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: width .5s var(--spring), margin .5s var(--spring), opacity .3s ease, transform .55s var(--spring);
}
.brand-pic picture, .brand-pic img { display: block; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.nav.has-pic .brand-pic { width: 30px; margin-right: 10px; opacity: 1; transform: none; }

/* Theme switch inside the phone menu (the round button is hidden there to make room) */
.menu-only { display: none; }
.menu-theme {
  display: block; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px;
  background: none; color: var(--text); font: inherit; font-size: 17px; text-align: left; cursor: pointer;
}
.menu-theme:hover { background: rgba(127, 127, 127, 0.12); }
.menu-theme .mt-light, [data-theme="dark"] .menu-theme .mt-dark { display: none; }
[data-theme="dark"] .menu-theme .mt-light { display: inline; }

@media (max-width: 734px) {
  .nav-right > .theme-toggle { display: none; }
  .menu-only { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
  .brand {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  }
  .brand-pic { grid-row: 1 / span 2; height: 38px; }
  .brand-pic picture, .brand-pic img { width: 38px; height: 38px; }
  .nav.has-pic .brand-pic { width: 38px; margin-right: 10px; }
  .brand-name, .brand-tag { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-pic { transition: opacity .2s ease; transform: none; }
}

/* "Know more": one short line per area */
.areas-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 14px 32px; gap: 14px 32px;
  margin: 8px 0 28px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.areas-list dt { font-size: 15px; font-weight: 600; color: var(--text); }
.areas-list dd { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
@media (min-width: 1001px) { .areas-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 734px) { .areas-list { grid-template-columns: 1fr; grid-gap: 12px; gap: 12px; } }

/* ==========================================================
curved 3D ring of cards (AI & things I've made)
   ========================================================== */
.ring { margin-top: 8px; }
/* Without JavaScript: a simple grid */
.ring-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-gap: 16px; gap: 16px; }
.ring-card { display: flex; flex-direction: column; padding: 26px 24px; border-radius: 18px; }
:root:not([data-theme="dark"]) .ring-card { background: #fff; }
.ring-card h3 { font-size: 20px; letter-spacing: -0.01em; }
.ring-card p { font-size: 15px; line-height: 1.5; }
.ring-card .status { font-size: 11px; }
.ring-card .stack li { font-size: 11px; padding: 2px 8px; }
.ring-card .more { margin-top: auto; padding-top: 14px; }
.ring .cf-controls { display: none; }

.js .ring .cf-controls { display: flex; margin-top: 4px; }
.js .ring .cf-caption { margin: 18px auto 4px; min-height: 0; font-size: 15px; }
.js .ring-stage {
  position: relative;
  height: 470px;
  overflow: hidden;
  perspective: 1800px;
  perspective-origin: 50% 45%;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  cursor: grab;
  /* side cards fade out softly at the edges, like the reference */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.js .ring.dragging .ring-stage { cursor: grabbing; }
.js .ring-track {
  display: block; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  transform-style: preserve-3d;
  transition: transform .8s var(--ease-out);
}
.js .ring-card {
  position: absolute; left: -140px; width: 280px;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 14px 34px rgba(0, 0, 0, 0.12);
  transition: opacity .5s ease, filter .5s ease, box-shadow .3s;
}
.js .ring-card:hover { transform: none; }
.js .ring-card:not(.is-front) { cursor: pointer; }
.js .ring-card.is-front { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 14px 30px rgba(0, 0, 0, 0.13); }
[data-theme="dark"].js .ring-card { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.7); }
.js .ring-card:focus-within { outline: 2px solid #0071e3; outline-offset: 3px; }

@media (max-width: 734px) {
  .js .ring-card { width: 72vw; left: -36vw; padding: 22px 20px; }
  /* use the full screen width so side cards and shadows are not cut by the page margin */
  .js .ring-stage { margin: 0 -16px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .js .ring-track, .js .ring-card { transition: none !important; }
}

/* ==========================================================
bookmarks tab (replaces the side rail)
   ========================================================== */
.marks {
  position: fixed; z-index: 18; top: 60px; right: 22px;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.8);
  transition: opacity .3s ease, transform .45s var(--spring), visibility 0s .3s;
}
.marks.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.marks-btn {
  width: 36px; height: 36px;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(0, 0, 0, 0.1);
}
.marks-btn svg { width: 17px; height: 17px; }
.marks.open .marks-btn { background: var(--solid); color: var(--solid-text); }
.marks-panel {
  position: absolute; top: 44px; right: 0; min-width: 200px;
  padding: 8px; border-radius: 18px;
  background: var(--nav);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 0 0 1px var(--line), 0 14px 36px rgba(0, 0, 0, 0.16);
  transform-origin: top right; animation: marks-in .35s var(--spring);
}
.marks-panel[hidden] { display: none; }
@keyframes marks-in { from { opacity: 0; transform: scale(.9) translateY(-6px); } to { opacity: 1; transform: none; } }
.marks-title { margin: 4px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.marks-panel ol { list-style: none; margin: 0; padding: 0; }
.marks-panel li[hidden] { display: none; }
.marks-panel a {
  display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 12px;
  font-size: 15px; color: var(--text);
}
.marks-panel a::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 12px; border-radius: 50%; background: var(--line);
}
.marks-panel a:hover { background: rgba(127, 127, 127, 0.12); }
.marks-panel a[aria-current="true"] { font-weight: 600; }
.marks-panel a[aria-current="true"]::before { background: var(--text); }
@media (max-width: 734px) {
  .marks { top: 80px; right: 16px; }
  .marks-panel { min-width: 220px; }
  .marks-panel a { min-height: 44px; font-size: 16px; }   /* comfortable finger size */
}
@media print { .marks { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .marks, .marks-panel { transition: none !important; animation: none !important; } }

/* ==========================================================
depth — layered drop shadows, a lit top edge and a small
   3D tilt on hover (mouse only), in light and dark
   ========================================================== */
:root {
  --surface: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  --surface-sunk: linear-gradient(180deg, #f2f2f5 0%, #f7f7f9 100%);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(0, 0, 0, 0.035);
  --sh-1: 0 1px 1px rgba(0, 0, 0, 0.04), 0 3px 6px rgba(0, 0, 0, 0.05), 0 10px 22px rgba(0, 0, 0, 0.06);
  --sh-2: 0 2px 4px rgba(0, 0, 0, 0.05), 0 12px 26px rgba(0, 0, 0, 0.1), 0 28px 56px rgba(0, 0, 0, 0.09);
  --sh-chip: 0 1px 1px rgba(0, 0, 0, 0.05), 0 2px 5px rgba(0, 0, 0, 0.06);
  --sh-inset: inset 0 2px 4px rgba(0, 0, 0, 0.07), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  --line-soft: rgba(0, 0, 0, 0.06);
  --tilt: perspective(900px) rotateX(2.5deg) translateY(-4px);
}
:root[data-theme="dark"] {
  --surface: linear-gradient(180deg, #252528 0%, #1b1b1d 100%);
  --surface-sunk: linear-gradient(180deg, #0c0c0d 0%, #141416 100%);
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  --sh-1: 0 1px 2px rgba(0, 0, 0, 0.6), 0 6px 14px rgba(0, 0, 0, 0.5), 0 16px 32px rgba(0, 0, 0, 0.45);
  --sh-2: 0 2px 4px rgba(0, 0, 0, 0.6), 0 14px 30px rgba(0, 0, 0, 0.6), 0 30px 60px rgba(0, 0, 0, 0.55);
  --sh-chip: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  --sh-inset: inset 0 2px 5px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --line-soft: rgba(255, 255, 255, 0.07);
}

/* Raised surfaces */
.acc, .tab-panel, .role, .cert-group, .acc .cert-group, .mini-stats div, .tab-panel .mini-stats div, .card:not(.cf-item):not(.ring-card) {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--edge), var(--sh-1);
}
.acc .role.current-role { box-shadow: var(--edge), var(--sh-1); }
.acc.open { box-shadow: var(--edge), var(--sh-2); }
.acc { transition: transform .45s var(--spring), box-shadow .35s ease; }
.mini-stats div, .cert-group { transition: transform .45s var(--spring), box-shadow .35s ease; }

/* Carousel cards: surface + lit edge + deeper shadow */
.cf-cards .cf-item, :root:not([data-theme="dark"]) .cf-cards .cf-item,
.ring-card, :root:not([data-theme="dark"]) .ring-card { background: var(--surface); }
.js .cf-cards .cf-item, [data-theme="dark"].js .cf-cards .cf-item,
.js .ring-card, [data-theme="dark"].js .ring-card { box-shadow: var(--edge), var(--sh-1); }
.js .cf-cards .cf-item[aria-hidden="false"], .js .ring-card.is-front,
[data-theme="dark"].js .cf-cards .cf-item[aria-hidden="false"], [data-theme="dark"].js .ring-card.is-front { box-shadow: var(--edge), var(--sh-2); }
.js .cf-photos .cf-item img, [data-theme="dark"].js .cf-photos .cf-item img { box-shadow: var(--sh-2); }

/* Tabs: a sunken track with a raised selected tab, like a real switch */
.tab-list { background: var(--surface-sunk); border: 1px solid var(--line-soft); box-shadow: var(--sh-inset); }
.tab-list [role="tab"][aria-selected="true"] {
  background: linear-gradient(180deg, #3a3a3c 0%, #1d1d1f 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 4px rgba(0, 0, 0, 0.18), 0 6px 14px rgba(0, 0, 0, 0.16);
}
[data-theme="dark"] .tab-list [role="tab"][aria-selected="true"] {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6ea 100%);
  color: #000;
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(0, 0, 0, 0.6), 0 6px 14px rgba(0, 0, 0, 0.5);
}

/* Chips: small raised pills */
.chips li, .tab-panel .chips li {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: var(--edge), var(--sh-chip);
}

/* Buttons: a touch of light on top and a soft shadow */
.btn-solid { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 4px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(0, 0, 0, 0.12); }
.icon-btn { box-shadow: var(--edge), var(--sh-chip); }
.nav .icon-btn { box-shadow: none; }
.marks-btn { box-shadow: var(--edge), var(--sh-1); }

/* Small 3D tilt on hover — only with a mouse, never on touch screens */
@media (hover: hover) and (pointer: fine) {
  .acc:not(.open):hover { transform: translateY(-3px); box-shadow: var(--edge), var(--sh-2); }
  .mini-stats div:hover, .cert-group:hover, .card:not(.cf-item):not(.ring-card):hover { transform: var(--tilt); box-shadow: var(--edge), var(--sh-2); }
  .chips li { transition: transform .35s var(--spring), box-shadow .25s ease; }
  .chips li:hover { transform: translateY(-2px); box-shadow: var(--edge), var(--sh-1); }
}
/* On touch: a gentle press instead */
.acc-btn:active { transform: scale(.99); }
.mini-stats div:active, .cert-group:active, .chips li:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .acc:hover, .mini-stats div:hover, .cert-group:hover, .card:hover, .chips li:hover { transform: none !important; }
}

/* ==========================================================
hero buttons — 3D depth + a soft ring that keeps pulsing
   while nobody is touching them (pauses on hover / focus / tap)
   ========================================================== */
:root { --cta-ring: rgba(29, 29, 31, 0.32); --cta-ring-soft: rgba(29, 29, 31, 0.18); }
:root[data-theme="dark"] { --cta-ring: rgba(245, 245, 247, 0.34); --cta-ring-soft: rgba(245, 245, 247, 0.2); }

.btn-3d {
  position: relative; isolation: isolate;
  padding: 13px 26px;
  transition: transform .45s var(--spring), box-shadow .3s ease, background .3s ease;
}
.btn-solid.btn-3d {
  background: linear-gradient(180deg, #3a3a3c 0%, #1d1d1f 100%); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.35),
              0 2px 3px rgba(0, 0, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.16), 0 18px 36px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] .btn-solid.btn-3d {
  background: linear-gradient(180deg, #ffffff 0%, #e4e4e9 100%); color: #000;
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, 0.12),
              0 2px 3px rgba(0, 0, 0, 0.6), 0 8px 18px rgba(0, 0, 0, 0.55), 0 18px 36px rgba(0, 0, 0, 0.45);
}
.btn-soft.btn-3d {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-soft);
  box-shadow: var(--edge), inset 0 -2px 0 rgba(0, 0, 0, 0.05), var(--sh-1);
}
.btn-soft.btn-3d span { display: inline-block; transition: transform .45s var(--spring); }
.btn-soft.btn-3d:hover span { transform: translateX(4px); }
.btn-3d:hover { transform: translateY(-2px) scale(1.03); }
.btn-solid.btn-3d:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -2px 0 rgba(0, 0, 0, 0.35), 0 4px 6px rgba(0, 0, 0, 0.18), 0 14px 28px rgba(0, 0, 0, 0.2), 0 26px 48px rgba(0, 0, 0, 0.12); }
.btn-soft.btn-3d:hover { box-shadow: var(--edge), inset 0 -2px 0 rgba(0, 0, 0, 0.05), var(--sh-2); }
.btn-3d:active { transform: translateY(1px) scale(.97); transition-duration: .08s; }

/* The ring */
.hero-cta::after {
  content: ""; position: absolute; z-index: -1; top: -1px; right: -1px; bottom: -1px; left: -1px;
  border-radius: inherit; pointer-events: none;
  animation: cta-ring 2.8s cubic-bezier(.2, .7, .3, 1) infinite;
}
.btn-soft.hero-cta::after { animation-delay: 1.4s; }
@keyframes cta-ring {
  0%   { box-shadow: 0 0 0 0 var(--cta-ring); }
  70%  { box-shadow: 0 0 0 14px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 14px rgba(0, 0, 0, 0); }
}
.btn-soft.hero-cta::after { --cta-ring: var(--cta-ring-soft); }
.hero-cta:hover::after, .hero-cta:focus-visible::after, .hero-cta:active::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .hero-cta::after { animation: none; } }

/* ==========================================================
click pointer on everything you can click (mouse only;
   falls back to the normal hand if the image can't be used)
   ========================================================== */
:root { --cursor-like: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2232%22 height=%2232%22 viewBox=%22-1 -1 26 26%22%3E%3Cg fill=%22none%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M14 4.1 12 6M5.1 8l-2.9-.8M6 12l-1.9 2M7.2 2.2 8 5.1%22 stroke=%22%23fff%22 stroke-width=%224%22/%3E%3Cpath d=%22M14 4.1 12 6M5.1 8l-2.9-.8M6 12l-1.9 2M7.2 2.2 8 5.1%22 stroke=%22%231d1d1f%22 stroke-width=%221.8%22/%3E%3Cpath d=%22M9.04 9.69a.5.5 0 0 1 .65-.65l11 4.5a.5.5 0 0 1-.07.95l-4.35 1.04a1 1 0 0 0-.74.74l-1.04 4.35a.5.5 0 0 1-.95.07z%22 stroke=%22%23fff%22 stroke-width=%224%22/%3E%3Cpath d=%22M9.04 9.69a.5.5 0 0 1 .65-.65l11 4.5a.5.5 0 0 1-.07.95l-4.35 1.04a1 1 0 0 0-.74.74l-1.04 4.35a.5.5 0 0 1-.95.07z%22 fill=%22%23fff%22 stroke=%22%231d1d1f%22 stroke-width=%221.8%22/%3E%3C/g%3E%3C/svg%3E") 12 13, pointer; }
a[href], button:not(:disabled), [role="tab"], summary, label[for], select, .acc-btn,
.cf-dots button, .js .cf-item[aria-hidden="true"], .js .ring-card:not(.is-front),
input[type="submit"], input[type="button"], .tab-list [role="tab"], .cf-cards .cf-item[aria-hidden="true"] { cursor: var(--cursor-like); }
button:disabled, .icon-btn:disabled { cursor: default; }

/* Carousel dots: small to look at, but a 24px target for fingers and mice */
.cf-dots button {
  position: relative; width: 24px; height: 24px; margin: 0; padding: 0;
  background: none !important; transform: none !important;
}
.cf-dots button::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
  border-radius: 50%; background: var(--line);
  transition: background .3s, transform .3s var(--spring);
}
.cf-dots button[aria-current="true"]::before { background: var(--text); transform: scale(1.3); }
.cf-dots button:hover::before { transform: scale(1.3); }

/* ==========================================================
   Feedback: quiet question at "Let's talk" + Duolingo-style card
   ========================================================== */
.fb-ask {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 34px;
  padding: 7px 8px 7px 18px; border-radius: 980px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--dark-text); font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .6s var(--spring);
}
.fb-ask[hidden] { display: none; }
.fb-ask.in { opacity: 1; transform: none; }
.fb-ask.done { opacity: .75; }
.fb-thumb {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); color: var(--dark-text);
  transition: transform .15s ease, background .2s, border-color .2s, color .2s;
}
.fb-thumb svg { width: 19px; height: 19px; }
.fb-thumb:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.fb-thumb:active:not(:disabled) { transform: scale(.96); }
.fb-thumb:disabled { opacity: .45; }
.fb-thumb.picked { opacity: 1; background: var(--dark-text); color: var(--dark-bg); border-color: transparent; }
@keyframes fb-soft { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

.fb-sheet { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.fb-sheet[hidden] { display: none; }
.fb-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity .25s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.fb-card {
  position: relative; width: 100%; max-width: 440px; padding: 18px 22px 22px; border-radius: 26px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line-soft);
  box-shadow: var(--edge), 0 24px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px) scale(.98); opacity: 0; transition: transform .3s var(--ease-out), opacity .2s ease;
  max-height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.fb-sheet.in .fb-backdrop { opacity: 1; }
.fb-sheet.in .fb-card { transform: none; opacity: 1; }
.fb-top { display: flex; align-items: center; gap: 14px; }
.fb-progress { flex: 1; display: flex; gap: 6px; }
.fb-progress span { flex: 1; height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; position: relative; }
.fb-progress span::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 0; border-radius: 6px;
  background: linear-gradient(180deg, #62aef8, #1c68d8); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35); transition: width .5s var(--spring); }
.fb-progress span.full::after { width: 100%; }
.fb-progress span.now::after { width: 18%; }
.fb-cheer { min-height: 20px; margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--ipod-solid, #1c68d8); }
:root[data-theme="dark"] .fb-cheer { color: #62aef8; }                 /* lighter blue keeps 4.5:1 contrast on the dark card */
.fb-stage { position: relative; margin-top: 4px; overflow: hidden; }
.fb-panel { position: relative; transition: transform .22s var(--ease-out), opacity .18s ease; }
.fb-panel.from-right { animation: fb-in-r .26s var(--ease-out) both; }
.fb-panel.from-left { animation: fb-in-l .26s var(--ease-out) both; }
.fb-panel.to-left, .fb-panel.to-right { position: absolute; top: 0; left: 0; right: 0; }
.fb-panel.to-left { transform: translateX(-60px); opacity: 0; pointer-events: none; }
.fb-panel.to-right { transform: translateX(60px); opacity: 0; pointer-events: none; }
@keyframes fb-in-r { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fb-in-l { from { transform: translateX(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
.fb-q { margin: 6px 0 16px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.fb-chips { display: grid; gap: 9px; }
.fb-chip {
  min-height: 48px; padding: 11px 16px; text-align: left; font: inherit; font-size: 16px; font-weight: 500; color: var(--text);
  position: relative; padding-right: 46px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  box-shadow: var(--edge), 0 2px 0 var(--line);
  transition: transform .12s ease, border-color .15s, background .15s;
}
.fb-chip::after {   /* the small tick that appears on the chosen answer */
  content: ""; position: absolute; right: 16px; top: 50%; width: 6px; height: 11px; margin-top: -8px;
  border: solid var(--ipod-solid, #1c68d8); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(.6); opacity: 0;
  transition: opacity .15s ease, transform .18s ease-out;
}
.fb-chip:hover { border-color: var(--muted); }
.fb-chip:active { transform: scale(.985); }
.fb-chip[aria-checked="true"] { border-color: rgba(28, 104, 216, 0.55); background: rgba(28, 104, 216, 0.05); }
.fb-chip[aria-checked="true"]::after { opacity: 1; transform: rotate(45deg) scale(1); }
:root[data-theme="dark"] .fb-chip::after { border-color: #62aef8; }
:root[data-theme="dark"] .fb-chip[aria-checked="true"] { border-color: rgba(98, 174, 248, 0.6); background: rgba(98, 174, 248, 0.08); }
.fb-note { width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 16px; resize: none; color: var(--text);
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); }
.fb-note:focus { outline: none; border-color: #1c68d8; }
.fb-count { display: block; margin-top: 6px; text-align: right; font-size: 12px; color: var(--muted); }
.fb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.fb-foot[hidden] { display: none; }
.fb-next { min-width: 150px; }
.fb-done { text-align: center; padding-top: 18px; }
.fb-done .fb-q { margin-bottom: 6px; }
.fb-sub { margin: 0; color: var(--muted); }
.fb-tick { width: 76px; height: 76px; margin: 6px auto 14px; border-radius: 50%; position: relative;
  background: linear-gradient(180deg, #62aef8, #1c68d8); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 10px 26px rgba(28, 104, 216, 0.35);
  animation: fb-soft .35s var(--ease-out) both; }
.fb-tick::after { content: ""; position: absolute; left: 27px; top: 17px; width: 16px; height: 30px; border: solid #fff; border-width: 0 6px 6px 0; border-radius: 2px; transform: rotate(45deg); }
@media (max-width: 734px) {
  .fb-sheet { padding: 12px; }
  .fb-card { padding: 16px 18px 20px; border-radius: 24px; }
  .fb-ask { font-size: 14px; }
}
/* Little room left (keyboard open on a small phone): keep the field and its button together */
.fb-sheet.is-tight { padding: 8px 12px; }
.fb-sheet.is-tight .fb-card { padding: 10px 16px 14px; border-radius: 20px; }
.fb-sheet.is-tight .fb-cheer { display: none; }
.fb-sheet.is-tight .fb-q { margin: 8px 0 10px; font-size: 18px; }
.fb-sheet.is-tight .fb-note { height: 64px; padding: 8px 12px; }
.fb-sheet.is-tight .fb-count { margin-top: 2px; }
.fb-sheet.is-tight .fb-foot { margin-top: 6px; }
.fb-sheet.is-tight .fb-next { padding-top: 9px; padding-bottom: 9px; }
.modal.is-tight { padding: 8px 12px; }
.modal.is-tight .modal-card { padding: 16px 18px 18px; }
.modal.is-tight .modal-card h2 { font-size: 22px; }
.modal.is-tight .modal-note { margin-bottom: 10px; }
.modal.is-tight #contact-form label { margin-bottom: 8px; }
.modal.is-tight #contact-form textarea { min-height: 72px; }
@media (prefers-reduced-motion: reduce) {
  .fb-ask, .fb-card, .fb-panel, .fb-chip, .fb-thumb, .spam-card { transition: none !important; animation: none !important; }
  .fb-panel.to-left, .fb-panel.to-right { display: none; }
}
