/* ---------- design tokens ---------- */
:root {
  --bg: #09090B;
  --card: #111827;
  --card-hi: #161f30;
  --accent: #4F8CFF;
  --accent-2: #6EE7B7;
  --text: #FAFAFA;
  --muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);
  --heading-font: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1120px;
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--heading-font); margin: 0; }

.text-gradient {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- background mesh ---------- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-mesh__blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  animation: drift 34s ease-in-out infinite alternate;
}
.bg-mesh__blob--1 { background: var(--accent); top: -12%; left: -10%; animation-duration: 30s; }
.bg-mesh__blob--2 { background: var(--accent-2); top: 30%; right: -14%; animation-duration: 38s; animation-delay: -6s; }
.bg-mesh__blob--3 { background: #7C6CF0; bottom: -18%; left: 20%; width: 38vw; height: 38vw; animation-duration: 42s; animation-delay: -12s; }

@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
  100% { transform: translate(-3%, -4%) scale(0.96); }
}

.bg-mesh__glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79, 140, 255, 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.bg-mesh__glow.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bg-mesh__blob { animation: none; }
}

/* ---------- layout shared ---------- */
.section { position: relative; z-index: 1; padding: 140px 24px; }
.section__inner { max-width: var(--max-width); margin: 0 auto; }
.section__kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 16px;
}
.section__title {
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 42px);
  letter-spacing: -0.01em;
  margin: 0 0 56px;
  max-width: 640px;
}

.tag, .chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}

.btn {
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn--primary {
  background: linear-gradient(100deg, var(--accent), #3f6fe0);
  color: #06070a;
  box-shadow: 0 8px 24px rgba(79, 140, 255, 0.35);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(79, 140, 255, 0.45); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--border-hi); background: rgba(255, 255, 255, 0.06); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal-group .reveal { transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 12px 10px 20px;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transition: padding 0.3s ease, top 0.3s ease;
  max-width: calc(100vw - 24px);
}
.navbar.is-scrolled { top: 10px; padding: 7px 10px 7px 18px; background: rgba(17, 24, 39, 0.85); }

.navbar__mark {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.navbar__links { position: relative; display: flex; gap: 22px; }
.navbar__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}
.navbar__links a:hover, .navbar__links a.is-active { color: var(--text); text-decoration: none; }
.navbar__indicator {
  position: absolute;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  opacity: 0;
}
.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #06070a;
  background: linear-gradient(100deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 220% 100%;
  animation: navcta-shimmer 7s linear infinite;
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 0 rgba(79, 140, 255, 0);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.navbar__cta:hover { text-decoration: none; box-shadow: 0 0 22px rgba(110, 231, 183, 0.45); }
@keyframes navcta-shimmer { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .navbar__cta { animation: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 24px 80px;
}
.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-2);
  margin: 0 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.kicker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}
.hero__title {
  font-weight: 800;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.hero__sub { font-size: 19px; color: var(--text); max-width: 520px; margin: 0 0 14px; opacity: 0.92; }
.hero__meta { font-size: 15px; color: var(--muted); max-width: 520px; margin: 0 0 36px; }
.hero__meta strong { color: var(--text); }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__visual { position: relative; height: 420px; }
.hero__orb-frame { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hero__orb-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 55%, transparent 75%);
  opacity: 0.5;
  filter: blur(30px);
  animation: float-orb 7s ease-in-out infinite;
}
.hero__photo {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-hi);
  box-shadow: 0 0 80px rgba(79, 140, 255, 0.35), var(--shadow-lg);
  animation: float-orb 7s ease-in-out infinite;
}
.hero__orb-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  animation: spin-slow 24s linear infinite;
}
.hero__orb-ring::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  top: -4px;
  left: 50%;
  box-shadow: 0 0 12px var(--accent-2);
}
@keyframes float-orb { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero__orb-card {
  position: absolute;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: float-card 6s ease-in-out infinite;
}
.hero__orb-card-label { font-size: 11px; color: var(--muted); }
.hero__orb-card-value { font-size: 14px; font-weight: 700; color: var(--text); }
.hero__orb-card--1 { top: 6%; left: -4%; animation-delay: 0s; }
.hero__orb-card--2 { bottom: 18%; right: -8%; animation-delay: 1.4s; }
.hero__orb-card--3 { bottom: -4%; left: 14%; animation-delay: 2.8s; }
@keyframes float-card { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero__scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  z-index: 1;
}
.hero__scroll-cue span {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-2);
  animation: scroll-cue 1.8s ease-in-out infinite;
}
@keyframes scroll-cue { 0% { opacity: 1; top: 6px; } 70% { opacity: 0; } 100% { opacity: 0; top: 16px; } }

/* ---------- stats ---------- */
.stats { position: relative; z-index: 1; padding: 0 24px 120px; }
.stats__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.stat-card:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.stat-card__value {
  display: block;
  font-family: var(--heading-font);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-card__label { font-size: 13px; color: var(--muted); margin-top: 8px; display: block; }

/* ---------- timeline ---------- */
.timeline { position: relative; max-width: 760px; }
.timeline__line {
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--border) 90%);
}
.timeline__item { position: relative; padding-left: 40px; margin-bottom: 48px; }
.timeline__item:last-child { margin-bottom: 0; }
.timeline__node {
  position: absolute;
  left: 0;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-hi);
}
.timeline__node--active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.15);
}
.timeline__period {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.timeline__title { font-size: 20px; font-weight: 700; margin: 6px 0 8px; }
.timeline__desc { color: var(--muted); font-size: 15px; margin: 0; max-width: 560px; }

/* ---------- experience ---------- */
.xp-card {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.xp-card__head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.xp-card__role { font-size: 26px; font-weight: 700; }
.xp-card__org { color: var(--muted); margin: 6px 0 0; font-size: 15px; }
.xp-card__period { font-size: 13px; color: var(--accent-2); font-weight: 600; white-space: nowrap; }
.xp-card__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }

.accordion__item {
  border-top: 1px solid var(--border);
  padding: 18px 0;
}
.accordion__item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.accordion__item summary::-webkit-details-marker { display: none; }
.accordion__item summary::after {
  content: '+';
  color: var(--accent);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.accordion__item[open] summary::after { transform: rotate(45deg); }
.accordion__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(110, 231, 183, 0.1);
  padding: 3px 9px;
  border-radius: 999px;
  margin-right: auto;
  margin-left: 12px;
}
.accordion__item p { color: var(--muted); margin: 12px 0 0; font-size: 15px; max-width: 640px; }

/* ---------- projects / case studies ---------- */
.projects-section .section__inner { margin-bottom: 40px; }
.case-study {
  max-width: var(--max-width);
  margin: 0 auto 120px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.case-study:last-of-type { margin-bottom: 0; }
.case-study--reverse .case-study__visual { order: 2; }
.case-study--reverse .case-study__copy { order: 1; }

.case-study__caption { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; }

.case-study__badge {
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.case-study__badge--shipped { color: var(--accent-2); background: rgba(110, 231, 183, 0.1); }
.case-study__badge--pilot { color: #F5B860; background: rgba(245, 184, 96, 0.12); }
.case-study__badge--design { color: var(--muted); background: rgba(255, 255, 255, 0.06); }

.case-study__title { font-size: 30px; font-weight: 700; margin-bottom: 24px; }
.case-study__field { margin: 0 0 18px; }
.case-study__field dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.case-study__field dd { margin: 0; color: var(--muted); font-size: 15px; }
.case-study__field dd strong { color: var(--text); }
.case-study__stack { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- mockups ---------- */
.mock {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-study__visual:hover .mock { transform: translateY(-6px) scale(1.01); }

.mock-chat { padding: 0; overflow: hidden; }
.mock-chat__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; }
.mock-dot--r { background: #FF6B6B; }
.mock-dot--y { background: #FFD166; }
.mock-dot--g { background: #6EE7B7; }
.mock-chat__title { font-size: 12px; color: var(--muted); margin-left: 6px; }
.mock-chat__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.mock-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.4;
}
.mock-bubble--user { align-self: flex-end; background: rgba(79, 140, 255, 0.18); color: var(--text); border: 1px solid rgba(79, 140, 255, 0.3); }
.mock-bubble--bot { align-self: flex-start; background: rgba(255, 255, 255, 0.05); color: var(--muted); border: 1px solid var(--border); }
.mock-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 14px; background: rgba(255, 255, 255, 0.05); border-radius: 14px; border: 1px solid var(--border); }
.mock-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typing-bounce 1.2s infinite ease-in-out; }
.mock-typing span:nth-child(2) { animation-delay: 0.15s; }
.mock-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.mock-phone {
  position: relative;
  width: 260px;
  margin: 0 auto;
  padding: 7px;
  border-radius: 44px;
  border: 1px solid var(--border-hi);
  background: linear-gradient(160deg, var(--card-hi), var(--card));
}
.mock-phone__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 20px;
  background: #000;
  border-radius: 11px;
  z-index: 2;
}

.mock-app {
  background: #F4F6F8;
  color: #16202B;
  border-radius: 38px;
  padding: 18px 16px;
  min-height: 320px;
  font-size: 13px;
}
.mock-app--screenshot {
  padding: 0;
  overflow: hidden;
  min-height: 564px;
}
.mock-app--screenshot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.mock-app__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.mock-app__greeting { font-weight: 700; font-size: 15px; margin: 0; }
.mock-app__patient { color: #64748B; font-size: 11.5px; margin: 3px 0 0; }
.mock-app__bell { font-size: 15px; }
.mock-app__banner {
  display: flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(120deg, #0F9D8C, #0B7F72);
  color: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.mock-app__banner-icon { font-size: 20px; background: rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 6px 8px; }
.mock-app__banner-title { font-weight: 700; font-size: 12.5px; margin: 0; }
.mock-app__banner-sub { font-size: 11px; margin: 3px 0 0; opacity: 0.85; }
.mock-app__actions { display: flex; gap: 8px; margin-bottom: 16px; }
.mock-app__action {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #33414F;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.mock-app__action span { display: block; font-size: 16px; margin-bottom: 4px; }
.mock-app__section-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #64748B; margin: 0 0 8px; }
.mock-app__visit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.mock-app__visit-date { color: #64748B; font-weight: 500; font-size: 12px; }

.mock-wireframe { padding: 24px; display: flex; flex-direction: column; gap: 12px; min-height: 260px; justify-content: center; }
.mock-wireframe__bar { width: 40%; height: 10px; border-radius: 4px; background: var(--border-hi); margin-bottom: 8px; }
.mock-wireframe__block { height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px dashed var(--border-hi); }
.mock-wireframe__block--lg { height: 64px; }
.mock-wireframe__row { display: flex; gap: 12px; }
.mock-wireframe__block--sm { flex: 1; height: 48px; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.skill-card {
  position: relative;
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.skill-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(79, 140, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.skill-card:hover::before { opacity: 1; }
.skill-card__title { font-size: 17px; font-weight: 700; margin-bottom: 16px; position: relative; }
.skill-card__chips { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }

/* ---------- resume ---------- */
.resume__inner { max-width: 780px; }
.resume__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.resume__head .section__title { margin-bottom: 0; }
.resume-doc {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}
.resume-doc__header h3 { font-size: 24px; margin-bottom: 6px; }
.resume-doc__header p { color: var(--muted); margin: 0 0 4px; font-size: 14px; }
.resume-doc__contact a { color: var(--accent-2); }
.resume-doc section { margin-top: 28px; }
.resume-doc h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.resume-doc p { margin: 0 0 8px; font-size: 14.5px; color: var(--text); }
.resume-doc ul { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; }
.resume-doc li { margin-bottom: 6px; }

@media print {
  .bg-mesh, .navbar, .hero, .stats, .timeline-section, .experience-section,
  .projects-section, .skills-section, .footer, .chat-widget, .resume__head button {
    display: none !important;
  }
  body { background: #fff; color: #000; }
  .resume-doc { border: none; box-shadow: none; background: #fff; color: #000; }
  .resume-doc h4 { color: #333; }
  .resume-doc p, .resume-doc ul, .resume-doc__header p { color: #222; }
}

/* ---------- footer ---------- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 48px 24px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer__name { font-weight: 700; font-size: 16px; margin: 0; }
.footer__tag { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer__links a { color: var(--muted); font-size: 14px; }
.footer__links a:hover { color: var(--text); text-decoration: none; }

/* ---------- chat widget ---------- */
.chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 300; }

.chat-widget__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-hi);
  color: var(--text);
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease, visibility 0.25s;
}
.chat-widget__toggle:hover { border-color: var(--accent-2); box-shadow: var(--shadow-lg), 0 0 26px rgba(110, 231, 183, 0.35); }
.chat-widget__toggle { position: relative; }
.chat-widget__toggle::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  box-shadow: 0 0 0 rgba(110, 231, 183, 0);
  animation: toggle-idle-pulse 20s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes toggle-idle-pulse {
  0%, 92%, 100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
  96% { box-shadow: 0 0 26px 6px rgba(110, 231, 183, 0.32); }
}
.chat-widget__toggle-bot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.22), transparent 72%);
  flex-shrink: 0;
  animation: bot-float 3.4s ease-in-out infinite;
}
.bot-icon__sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 6px var(--accent-2);
  opacity: 0;
  animation: sparkle-twinkle 8s ease-in-out infinite;
}
.bot-icon__sparkle--1 { top: -1px; right: 1px; }
.bot-icon__sparkle--2 { bottom: 1px; left: -1px; animation-delay: 4s; }
@keyframes sparkle-twinkle {
  0%, 85%, 100% { opacity: 0; transform: scale(0.4); }
  90% { opacity: 1; transform: scale(1.2); }
  95% { opacity: 0; transform: scale(0.6); }
}

/* ---------- pixel-art bot icon ---------- */
.bot-icon { display: block; width: 20px; height: 18px; overflow: visible; }
.bot-icon__head { fill: #0c1220; stroke: var(--accent-2); stroke-width: 1; }
.bot-icon__eye { fill: var(--accent-2); transform-box: fill-box; transform-origin: center; animation: bot-blink 4.6s ease-in-out infinite; }
.bot-icon__stem { fill: var(--border-hi); }
.bot-icon__antenna { fill: var(--accent-2); transform-box: fill-box; transform-origin: center; animation: bot-antenna-pulse 3.2s ease-in-out infinite; }

.bot-icon--static .bot-icon__eye,
.bot-icon--static .bot-icon__antenna,
.bot-icon--no-bob { animation: none !important; }
.bot-icon--static .bot-icon__antenna { opacity: 0.9; }

@keyframes bot-blink {
  0%, 90%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.15); }
}
@keyframes bot-antenna-pulse {
  0%, 65%, 100% { opacity: 0.55; filter: drop-shadow(0 0 0 transparent); }
  78% { opacity: 1; filter: drop-shadow(0 0 4px var(--accent-2)); }
}
@keyframes bot-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) {
  .bot-icon__eye, .bot-icon__antenna, .chat-widget__toggle-bot, .chat-widget__toggle::before, .bot-icon__sparkle { animation: none; }
}
.chat-widget.is-open .chat-widget__toggle {
  opacity: 0;
  transform: scale(0.85);
  visibility: hidden;
  pointer-events: none;
}

.chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  display: flex;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(140deg, rgba(79, 140, 255, 0.6), rgba(110, 231, 183, 0.4), rgba(255, 255, 255, 0.06));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px) scale(0.94);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.4s;
}
.chat-widget.is-open .chat-panel {
  opacity: 1;
  transform: none;
  visibility: visible;
  pointer-events: auto;
}

.chat-panel-content {
  background: #0c1220;
  border-radius: calc(var(--radius-lg) - 1px);
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.chat-panel__title-group { display: flex; align-items: center; gap: 10px; }
.chat-panel__avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.chat-panel__avatar--ai { background: radial-gradient(circle at 35% 30%, rgba(110, 231, 183, 0.35), rgba(79, 140, 255, 0.25) 70%); border: 1px solid var(--border-hi); }
.chat-panel__avatar--user { background: linear-gradient(135deg, #7C6CF0, #4F8CFF); }
.chat-panel__title-group div { display: flex; flex-direction: column; }
.chat-panel__title { font-size: 14px; font-weight: 700; }
.chat-panel__subtitle { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 6px var(--accent-2); animation: bot-antenna-pulse 2.4s ease-in-out infinite; }
.chat-panel__close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; padding: 8px; margin: -8px; line-height: 1; }
.chat-panel__close:hover { color: var(--text); }
.chat-panel__header-actions { display: flex; align-items: center; gap: 2px; }
.chat-panel__icon-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  transition: color 0.2s ease, background 0.2s ease;
}
.chat-panel__icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.chat-panel__icon-btn .icon-mute-line { opacity: 1; transition: opacity 0.15s ease; }
.chat-panel__icon-btn[aria-pressed="true"] { color: var(--accent-2); }
.chat-panel__icon-btn[aria-pressed="true"] .icon-mute-line { opacity: 0; }

.chat-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 140, 255, 0.4) transparent;
}
.chat-panel__body::-webkit-scrollbar { width: 6px; }
.chat-panel__body::-webkit-scrollbar-track { background: transparent; }
.chat-panel__body::-webkit-scrollbar-thumb { background: rgba(79, 140, 255, 0.4); border-radius: 999px; }
.chat-panel__body::-webkit-scrollbar-thumb:hover { background: rgba(79, 140, 255, 0.6); }

.chat-msg { display: flex; gap: 8px; max-width: 92%; animation: msg-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chat-msg { animation: none; } }
.chat-msg--user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg__avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.chat-msg--assistant .chat-msg__avatar { background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 70%); }
.chat-msg--user .chat-msg__avatar { background: linear-gradient(135deg, #7C6CF0, #4F8CFF); }
.chat-msg__bubble { font-size: 13.5px; line-height: 1.55; padding: 10px 13px; border-radius: 14px; }
.chat-msg--assistant .chat-msg__bubble { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text); }
.chat-msg--user .chat-msg__bubble { background: rgba(79, 140, 255, 0.18); border: 1px solid rgba(79, 140, 255, 0.3); color: var(--text); }
.chat-msg--error .chat-msg__bubble { background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.35); color: #FFB0B0; }
.chat-msg__bubble code { background: rgba(255, 255, 255, 0.08); padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }
.chat-msg__bubble pre { background: rgba(0, 0, 0, 0.35); padding: 10px 12px; border-radius: 8px; overflow-x: auto; margin: 6px 0; }
.chat-msg__bubble pre code { background: none; padding: 0; }
.chat-msg__bubble ul { margin: 6px 0; padding-left: 18px; }
.chat-msg__bubble table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12.5px; }
.chat-msg__bubble th, .chat-msg__bubble td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; }
.chat-msg__bubble th { background: rgba(255, 255, 255, 0.06); font-weight: 600; }

.chat-intro { margin-bottom: 2px; }
.chat-intro__lede { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.chat-intro__sub { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.55; }

.chat-typing-dots { display: flex; gap: 4px; padding: 4px 2px; }
.chat-typing-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: typing-bounce 1.2s infinite ease-in-out; }
.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.chat-starters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chat-starter {
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 12.5px;
  font-weight: 500;
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chat-starter:hover { border-color: var(--accent); background: rgba(79, 140, 255, 0.1); }

.chat-panel__input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-panel__input {
  flex: 1;
  resize: none;
  max-height: 140px;
  overflow-y: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  outline: none;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 13.5px;
  line-height: 1.4;
  padding: 10px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.chat-panel__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15); background: rgba(255, 255, 255, 0.07); }
.chat-panel__input::placeholder { color: var(--muted); }
.chat-panel__input::-webkit-scrollbar { display: none; }
.chat-panel__mic[hidden], .chat-panel__icon-btn[hidden] { display: none; }
.chat-panel__mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chat-panel__mic:hover { color: var(--text); border-color: var(--border-hi); }
.chat-panel__mic[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, #FF6B6B, #ff8a8a);
  border-color: transparent;
  animation: mic-listening-pulse 1.4s ease-in-out infinite;
}
@keyframes mic-listening-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}
@media (prefers-reduced-motion: reduce) { .chat-panel__mic[aria-pressed="true"] { animation: none; } }
.chat-panel__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #06070a;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.chat-panel__send:disabled { opacity: 0.5; cursor: default; }

.chat-panel__disclaimer { font-size: 10.5px; color: var(--muted); text-align: center; padding: 0 12px 12px; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: left; }
  .hero__visual { height: 300px; order: -1; }
  .case-study, .case-study--reverse { grid-template-columns: 1fr; }
  .case-study--reverse .case-study__visual, .case-study--reverse .case-study__copy { order: initial; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .navbar__links { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 96px 18px; }
  .hero { padding: 120px 18px 60px; min-height: auto; }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .stats__inner { grid-template-columns: 1fr 1fr; gap: 12px; }
  .xp-card { padding: 24px; }
  .resume-doc { padding: 28px; }
  .chat-widget { right: 16px; bottom: 16px; left: 16px; }
  .chat-widget__toggle { width: 100%; justify-content: center; }

  /* Bottom sheet, ChatGPT-mobile style, instead of a floating corner card. */
  .chat-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 85vh;
    border-radius: 24px 24px 0 0;
    padding: 1px 1px 0;
    transform: translateY(100%);
  }
  .chat-widget.is-open .chat-panel { transform: translateY(0); }
  .chat-panel-content { border-radius: 24px 24px 0 0; }
}
