/* mudit agarwal — personal site */

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

:root {
  --bg: #060a06;
  --bg-alt: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text: #e5e5e5;
  --text-secondary: #999999;
  --text-dim: #666666;
  --accent: #c8ff00;
  --accent-dim: rgba(200, 255, 0, 0.1);
  --accent-glow: rgba(200, 255, 0, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --transition: 0.2s ease;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- selection color --- */
::selection {
  background: rgba(200, 255, 0, 0.25);
  color: #fff;
}

::-moz-selection {
  background: rgba(200, 255, 0, 0.25);
  color: #fff;
}

/* --- focus states --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: linear-gradient(to top, #071207, #040804 40%, #030503);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* --- snap-scroll slideshow (large desktop only) --- */
@media (min-width: 1025px) and (min-height: 650px) {
  main {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: calc(100vh - 33px);
    scroll-behavior: smooth;
  }

  .hero, .section {
    scroll-snap-align: start;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
  }

  .hero {
    padding: 0;
  }

  .section .container {
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .section .container::-webkit-scrollbar {
    display: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

.mono {
  font-family: var(--mono);
  font-size: 0.8em;
  letter-spacing: -0.01em;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- nav --- */
.nav {
  position: fixed;
  top: 33px;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: color var(--transition);
  letter-spacing: 0.02em;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all var(--transition);
}

.nav-toggle.open span:first-child {
  transform: rotate(45deg) translate(2px, 2px);
}

.nav-toggle.open span:last-child {
  transform: rotate(-45deg) translate(2px, -2px);
}

/* --- hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(200, 255, 0, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, rgba(200, 255, 0, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.015'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  opacity: 0.5;
}

/* hero entrance keyframes */
@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-tag {
  color: var(--accent);
  margin: 0 0 0.75rem 0;
  padding: 0;
  font-size: 0.77rem;
  text-transform: lowercase;
  max-width: 560px;
}

.hero-title {
  font-size: clamp(1.8rem, 3.8vw, 2.9rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 1.5rem 0;
  padding: 0;
  max-width: 560px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 0.88rem;
  max-width: 511px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  max-width: 511px;
}

.hero-links .btn {
  flex: 1;
  justify-content: center;
  padding: 0.55rem 0.4rem;
  min-width: 0;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* --- hero gears background --- */
.hero-gears-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero .container::before {
  content: '';
  position: absolute;
  top: -3rem;
  left: -3rem;
  width: 620px;
  bottom: -2rem;
  background: linear-gradient(to right, rgba(4, 8, 4, 0.10) 30%, rgba(4, 8, 4, 0) 100%);
  z-index: -1;
  pointer-events: none;
}

/* hero-blurb removed, using .hero-sub instead */

#rippleCanvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.ripple-label {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-size: 0.75rem;
  color: rgba(200, 255, 0, 0.30);
  letter-spacing: 0.08em;
  z-index: 2;
}

.nav-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 1.5rem;
}

.pond-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(200, 255, 0, 0.12);
  color: rgba(200, 255, 0, 0.4);
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
}
.pond-toggle:hover {
  background: rgba(200, 255, 0, 0.06);
  border-color: rgba(200, 255, 0, 0.25);
  color: rgba(200, 255, 0, 0.6);
}
.pond-toggle.off {
  color: rgba(200, 255, 0, 0.25);
  text-decoration: line-through;
}

/* --- links toggle + panel --- */
.links-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(200, 255, 0, 0.12);
  color: rgba(200, 255, 0, 0.4);
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
}
.links-toggle:hover {
  background: rgba(200, 255, 0, 0.06);
  border-color: rgba(200, 255, 0, 0.25);
  color: rgba(200, 255, 0, 0.6);
}

.links-toggle-footer {
  display: none;
}
.links-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  background: rgba(10, 12, 10, 0.97);
  border-top: 1px solid rgba(200, 255, 0, 0.12);
  padding: 0.7rem 2rem;
  display: none;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  backdrop-filter: blur(12px);
}
.links-panel.open {
  display: flex;
}
.links-panel a {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.links-panel a:hover {
  color: var(--accent);
}
.links-hide {
  position: absolute;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.links-hide:hover {
  color: var(--accent);
}

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
  text-decoration: none;
  font-weight: 500;
}

.btn:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(200, 255, 0, 0.12);
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  box-shadow: none;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* --- sections --- */
.section {
  padding: clamp(3rem, 5vh, 7rem) 0;
  position: relative;
}
.section > .container {
  position: relative;
  z-index: 1;
}

.section-alt {
  background: var(--bg-alt);
  position: relative;
}

/* subtle dot grid on alt sections */
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.section-label {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.section-intro {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* --- about --- */
#about .section-label {
  margin-bottom: 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
  background: transparent;
  padding: 1rem 0;
  border-radius: 8px;
  position: relative;
  z-index: 2;
}

.about-text {
  padding: 0;
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.about-text .lead {
  font-size: 1.3rem;
  color: var(--text);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.about-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: text-underline-offset 0.2s ease;
}

.about-text a:hover {
  text-underline-offset: 5px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  align-self: start;
}

.stat-card {
  background: rgba(10, 10, 10, 0.7);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: background 0.3s ease;
  backdrop-filter: blur(4px);
}

.stat-card:hover {
  background: rgba(22, 22, 22, 0.8);
}

.stat-num {
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 500;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: lowercase;
}

/* --- research --- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.research-card {
  background: rgba(17, 17, 17, 0.85);
  padding: 2rem;
  transition: background 0.3s ease;
  position: relative;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.research-card:hover {
  background: var(--bg-card-hover);
}

.research-card:hover::before {
  opacity: 1;
}

.research-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  text-transform: lowercase;
}

.research-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.research-focus {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.research-card > p:not(.research-focus):not(.research-output) {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.65;
}

.research-output {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: lowercase;
}

/* --- project (landmarkdiff) --- */
.project-hero {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3rem;
  background: var(--bg-card);
  transition: border-color 0.4s ease;
}

.project-hero:hover {
  border-color: var(--border-hover);
}

.project-title {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.project-tagline {
  color: var(--text-dim);
  font-size: 0.7rem;
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
}

.project-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-stack h4 {
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: lowercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.project-stack ul {
  list-style: none;
}

.project-stack li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  transition: padding-left 0.2s ease;
}

.project-stack li:hover {
  padding-left: 0.25rem;
}

.project-stack li .mono {
  color: var(--text-dim);
  min-width: 70px;
  font-size: 0.7rem;
}

/* --- clinical --- */
.clinical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.clinical-card {
  background: rgba(10, 10, 10, 0.7);
  padding: 2rem;
  transition: background 0.3s ease;
  backdrop-filter: blur(4px);
}

.clinical-card:hover {
  background: var(--bg-card-hover);
}

.clinical-card h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.clinical-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.clinical-card > p:last-child {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.shadowing {
  margin-bottom: 3rem;
}

.shadowing > h3 {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  text-transform: lowercase;
}

.shadowing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.shadowing-item {
  background: var(--bg-alt);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: background 0.3s ease;
}

.shadowing-item:hover {
  background: var(--bg-card-hover);
}

.shadowing-item .mono {
  color: var(--text);
  font-size: 0.75rem;
}

.shadowing-item span:last-child {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.service > h3 {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  font-weight: 400;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.service-item {
  background: var(--bg-alt);
  padding: 1.5rem;
  transition: background 0.3s ease;
}

.service-item:hover {
  background: var(--bg-card-hover);
}

.service-item h4 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.service-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- mentorship --- */
.mentorship-intro {
  max-width: 650px;
  margin-bottom: 3rem;
}

.mentorship-intro .lead {
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.mentorship-intro p:last-child {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.pricing-card {
  background: var(--bg-card);
  padding: 2rem;
  position: relative;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.pricing-featured {
  background: var(--bg-card-hover);
}

.pricing-featured::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.pricing-badge {
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.pricing-card h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.pricing-desc {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.pricing-price span {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 400;
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-card li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
}

.pricing-card li::before {
  content: '\2013';
  margin-right: 0.5rem;
  color: var(--text-dim);
}

.yt-cta {
  text-align: center;
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  transition: border-color 0.4s ease;
}

.yt-cta:hover {
  border-color: var(--border-hover);
}

.yt-cta .mono {
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.yt-cta > p:not(.mono) {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* --- contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-text .lead {
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color var(--transition), padding-left 0.2s ease;
}

.contact-link:hover {
  color: var(--accent);
  padding-left: 0.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font);
  font-size: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 255, 0, 0.08);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
  color: var(--text-secondary);
}

.contact-form select {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  flex: 1;
}

.form-wrapper {
  position: relative;
  min-height: 100%;
}

.form-wrapper .contact-form {
  height: 100%;
}

.form-success {
  display: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding: 0;
  position: absolute;
  inset: 0;
}

.form-success.show {
  display: flex;
  animation: hero-fade-up 0.5s var(--ease-out-expo) both;
}

.mini-terminal {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(8, 8, 8, 0.95);
  text-align: left;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.mini-terminal-bar {
  display: flex;
  gap: 8px;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.mini-terminal-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mini-terminal-bar span:nth-child(1) {
  background: #ff5f57;
}

.mini-terminal-bar span:nth-child(2) {
  background: #febc2e;
}

.mini-terminal-bar span:nth-child(3) {
  background: #28c840;
}

.mini-terminal-body {
  padding: 1.2rem 1.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.8;
  flex: 1;
}

.term-line {
  color: var(--text-secondary);
  min-height: 1.4em;
}

.term-line .accent {
  color: var(--accent);
}

.term-input-line {
  display: flex;
  align-items: center;
}

.term-prefix {
  color: var(--text-secondary);
  white-space: pre;
}

.term-input {
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  width: 1.5ch;
  padding: 0;
  caret-color: var(--accent);
}

/* --- footer toggle arrow --- */
.footer-arrow {
  display: block;
  margin: 1.5rem auto 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 30px;
  text-align: center;
  transition: all 0.25s ease;
}
.footer-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.footer-arrow.open {
  transform: rotate(180deg);
}

/* --- inline footer (inside contact section) --- */
#mentorship > .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.inline-footer {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: #0a1f0a;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0;
  border-top: 1px solid rgba(200, 255, 0, 0.08);
}

.inline-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.scroll-top-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1;
  color: var(--text-dim);
  transition: all var(--transition);
  text-decoration: none;
  margin-left: 1.5rem;
  vertical-align: middle;
}
.scroll-top-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--mono);
  font-size: inherit;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

/* --- animations --- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- responsive --- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .project-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .clinical-grid {
    grid-template-columns: 1fr;
  }

  .shadowing-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding: 6rem 0 4rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.open a {
    font-size: 1.2rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
    z-index: 101;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .shadowing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .project-hero {
    padding: 2rem 1.5rem;
  }

  /* disable hover lift on mobile to avoid sticky :hover states */
  .pricing-card:hover {
    transform: none;
    box-shadow: none;
  }
}

@media (max-width: 414px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 5rem 0 3rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-links {
    flex-direction: column;
  }

  .hero-links .btn {
    width: 100%;
    justify-content: center;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .shadowing-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }

  .research-card,
  .clinical-card {
    padding: 1.5rem;
  }

  .project-hero {
    padding: 1.5rem 1.25rem;
  }

  .project-title {
    font-size: 1.6rem;
  }
}

/* --- status bar --- */
.status-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 101;
}

.status-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- hero grid --- */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* --- typing cat --- */
.hero-cat {
  position: relative;
  z-index: 2;
  animation: hero-fade-up 0.8s var(--ease-out-expo) 0.7s both;
}

.cat-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.cat-body {
  position: relative;
  width: 80px;
  height: 60px;
  background: var(--text-dim);
  border-radius: 40px 40px 20px 20px;
  z-index: 2;
}

.cat-head {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 40px;
  background: var(--text-dim);
  border-radius: 50% 50% 40% 40%;
}

.cat-ear {
  position: absolute;
  top: -10px;
  width: 14px;
  height: 18px;
  background: var(--text-dim);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.cat-ear-l { left: 4px; transform: rotate(-10deg); }
.cat-ear-r { right: 4px; transform: rotate(10deg); }

.cat-eye {
  position: absolute;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 4s ease infinite;
}

.cat-eye-l { left: 12px; }
.cat-eye-r { right: 12px; }

@keyframes blink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.cat-paw {
  position: absolute;
  bottom: -4px;
  width: 16px;
  height: 20px;
  background: var(--text-dim);
  border-radius: 8px 8px 10px 10px;
  z-index: 3;
}

.cat-paw-l {
  left: 12px;
  animation: type-left 0.6s ease infinite alternate;
}

.cat-paw-r {
  right: 12px;
  animation: type-right 0.6s ease infinite alternate-reverse;
}

@keyframes type-left {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

@keyframes type-right {
  0% { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

.cat-laptop {
  width: 120px;
  position: relative;
  margin-top: -8px;
}

.cat-screen {
  width: 100%;
  height: 70px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  padding: 8px;
  overflow: hidden;
}

.cat-code {
  font-size: 0.45rem;
  color: var(--accent);
  line-height: 1.4;
  display: block;
  white-space: pre;
  opacity: 0.7;
}

.cat-keyboard {
  width: 130px;
  height: 8px;
  background: var(--text-dim);
  border-radius: 0 0 4px 4px;
  margin: 0 auto;
  opacity: 0.6;
}

/* --- subsection labels --- */
.subsection-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  font-weight: 400;
}

.subsection-label:first-of-type {
  margin-top: 0;
}

/* --- clinical hours badge --- */
.clinical-hours {
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.clinical-card h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* clinical grid override */
.clinical-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 0;
}

#clinical .section-label {
  margin-bottom: 1rem;
}

#clinical .section-intro {
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

#clinical .clinical-card {
  padding: 1.2rem 1.4rem;
}

#clinical .clinical-card h4 {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}

#clinical .clinical-card > p:last-child {
  font-size: 0.78rem;
  line-height: 1.5;
}

#clinical .clinical-hours {
  margin-bottom: 0.3rem;
}

#clinical .clinical-meta {
  margin-bottom: 0.4rem;
}

#clinical .subsection-label {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* shadowing accordion */
.shadowing-details {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.shadow-group {
  background: rgba(10, 10, 10, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.shadow-group.stair-in {
  opacity: 1;
  transform: translateY(0);
}
.shadow-group:nth-child(2) { transition-delay: 0.07s; }
.shadow-group:nth-child(3) { transition-delay: 0.14s; }
.shadow-group:nth-child(4) { transition-delay: 0.21s; }
.shadow-group:nth-child(5) { transition-delay: 0.28s; }

.shadow-group + .shadow-group {
  border-top: 1px solid var(--border);
}

.shadow-group summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s;
}

.shadow-group summary::-webkit-details-marker { display: none; }

.shadow-group summary:hover {
  background: rgba(200, 255, 0, 0.04);
}

.shadow-specialty {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.shadow-hours {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.shadow-content {
  padding: 0.5rem 1.2rem 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  animation: accordionSlide 0.3s ease;
}

@keyframes accordionSlide {
  from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  to { opacity: 1; max-height: 300px; }
}

.shadow-doctor {
  flex: 1 1 220px;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 5px;
}

.shadow-doctor h4 {
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.shadow-doctor .mono {
  font-size: 0.65rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.shadow-doctor p:last-child {
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.45;
}

#projects .section-label {
  margin-bottom: 1rem;
}

#projects .section-intro {
  margin-bottom: 1.5rem;
}

/* --- projects carousel --- */
.projects-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.projects-carousel::-webkit-scrollbar {
  height: 4px;
}

.projects-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.projects-carousel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.project-card {
  min-width: 380px;
  max-width: 420px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
}

.project-card-featured {
  border-color: rgba(200, 255, 0, 0.2);
  min-width: 460px;
  max-width: 500px;
}

.project-status {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: lowercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.project-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.project-card > p:not(.project-sub):not(.project-vision) {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.project-tech span {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--text-secondary);
  border-radius: 3px;
}

.project-vision {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.project-vision strong {
  color: var(--text);
  font-weight: 500;
}

.project-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: color var(--transition);
  margin-top: auto;
}

.project-link:hover {
  color: var(--accent);
}

/* --- publications --- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.pub-item {
  background: var(--bg-alt);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  transition: background 0.3s ease;
  border-left: 3px solid transparent;
}
.pub-item[data-type="poster"]      { border-left-color: #3dc8e8; }
.pub-item[data-type="talk"]        { border-left-color: #c8ff00; }
.pub-item[data-type="paper"]       { border-left-color: #ff6b6b; }
.pub-item[data-type="talk-poster"] { border-left-color: #c8ff00; border-image: linear-gradient(to bottom, #c8ff00 50%, #3dc8e8 50%) 1; }

.pub-item {
  position: relative;
}

.pub-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.92);
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pub-item[data-tip]:hover::after {
  opacity: 1;
}

.pub-item[data-type="paper"][data-tip]::after   { border-color: rgba(255, 107, 107, 0.35); color: #ff6b6b; }
.pub-item[data-type="poster"][data-tip]::after   { border-color: rgba(61, 200, 232, 0.35); color: #3dc8e8; }
.pub-item[data-type="talk"][data-tip]::after     { border-color: rgba(200, 255, 0, 0.35); color: #c8ff00; }
.pub-item[data-type="talk-poster"][data-tip]::after { border-color: rgba(200, 255, 0, 0.35); color: #c8ff00; }

.pub-item:hover {
  background: var(--bg-card-hover);
}

.pub-status {
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: lowercase;
  white-space: nowrap;
  min-width: 65px;
  flex-shrink: 0;
}

.pub-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pub-item strong {
  color: var(--text);
}

.pub-item em {
  color: var(--text-dim);
}

/* --- tools grid --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tools-group h4 {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.tools-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tools-tags span {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  transition: border-color 0.2s ease;
}

.tools-tags span:hover {
  border-color: var(--border-hover);
}

/* --- mentorship block --- */
.mentorship-block {
  max-width: 700px;
  display: flex;
  flex-direction: column;
}

.mentorship-block p:last-child {
  margin-bottom: 0;
}

.mentorship-block .lead {
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.mentorship-block p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.mentorship-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* --- fun stat card --- */
.stat-card-fun {
  background: var(--accent-dim);
}

.stat-card-fun .stat-label {
  color: var(--text-secondary);
}

/* --- shadowing details --- */
.shadowing-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

/* --- projects small grid --- */
.projects-small-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.project-small {
  background: var(--bg-alt);
  padding: 1.5rem;
  transition: background 0.3s ease;
}

.project-small:hover {
  background: var(--bg-card-hover);
}

.project-small h4 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.project-small > p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.project-small .project-tech {
  margin-bottom: 0;
}

.project-small .project-tech span {
  font-size: 0.6rem;
  padding: 0.2rem 0.4rem;
}

/* --- clinical grid variants --- */
.clinical-grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

.clinical-grid-1 {
  grid-template-columns: 1fr !important;
}

.clinical-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

/* --- service grid variants --- */
.service-grid-1 {
  grid-template-columns: 1fr !important;
}

.service-grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

.service-grid-3 {
  grid-template-columns: repeat(3, 1fr) !important;
}

.service-meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.service-type {
  display: inline-block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(200,255,0,0.15);
  border-radius: 3px;
}

.service-links {
  margin-top: 0.75rem;
}

.service-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color var(--transition);
}

.service-links a:hover {
  color: var(--accent);
}

/* --- accent link --- */
.accent-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- research card link --- */
.research-card-link {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.research-detail-link {
  color: var(--accent);
}

/* --- scroll cat --- */
.scroll-cat {
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 50;
  pointer-events: none;
}

.cat-sprite {
  width: 40px;
  height: 30px;
  position: relative;
}

/* idle cat */
.cat-idle::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 18px;
  background: var(--text-dim);
  border-radius: 12px 12px 6px 6px;
}

.cat-idle::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 14px;
  background: var(--text-dim);
  border-radius: 50%;
  box-shadow:
    -4px -6px 0 -3px var(--text-dim),
    4px -6px 0 -3px var(--text-dim),
    -3px 1px 0 -2px var(--accent),
    3px 1px 0 -2px var(--accent);
}

/* sleeping cat */
.cat-sleep::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 14px;
  background: var(--text-dim);
  border-radius: 14px 14px 6px 6px;
}

.cat-sleep::after {
  content: 'zzz';
  position: absolute;
  bottom: 16px;
  right: -8px;
  font-family: var(--mono);
  font-size: 0.5rem;
  color: var(--accent);
  opacity: 0.6;
  animation: float-zzz 2s ease infinite;
}

@keyframes float-zzz {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(-6px); opacity: 0.3; }
}

/* running cat */
.cat-run-right::before,
.cat-run-left::before {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 16px;
  background: var(--text-dim);
  border-radius: 12px 12px 4px 4px;
}

.cat-run-right::after,
.cat-run-left::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 12px;
  background: var(--text-dim);
  border-radius: 50%;
  box-shadow:
    -3px -5px 0 -2px var(--text-dim),
    3px -5px 0 -2px var(--text-dim),
    -2px 1px 0 -1.5px var(--accent),
    2px 1px 0 -1.5px var(--accent);
  animation: cat-bob 0.2s ease infinite alternate;
}

.cat-run-left {
  transform: scaleX(-1);
}

@keyframes cat-bob {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-2px); }
}

/* --- stat full-width --- */
.stat-card-full {
  grid-column: 1 / -1;
}

/* --- research (3-col, compact) --- */
.research-grid {
  grid-template-columns: repeat(3, 1fr);
}

.research-card {
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.research-card > p:not(.research-focus):not(.research-output) {
  font-size: 0.84rem;
  line-height: 1.5;
  flex: 1;
}

.research-card h3 {
  font-size: 0.94rem;
}

.research-output {
  margin-top: auto;
  padding-top: 0.4rem;
}

#research .section-label {
  margin-bottom: 0.6rem;
}

#research .section-intro {
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.research-meta {
  margin-bottom: 0.5rem;
}

.research-focus {
  margin-bottom: 0.5rem;
}

/* --- projects viewer (sidebar + card) --- */
.proj-viewer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.8rem;
  align-items: stretch;
  min-height: 0;
}

.proj-sidebar {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}

.proj-tab {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(10,10,10,0.4);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  transition: all 0.15s;
  flex: 1;
  min-width: 0;
}

.proj-tab:hover {
  background: rgba(200,255,0,0.05);
  border-color: rgba(200,255,0,0.12);
}

.proj-tab-name {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-tab-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-tab-status {
  font-size: 0.58rem;
  color: var(--text-dim);
  margin-top: auto;
}

.proj-detail-area {
  position: relative;
}

.proj-card {
  display: none;
  padding: 1.4rem 1.6rem;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(10,10,10,0.5);
  animation: fadeSlideIn 0.2s ease;
}

.proj-card.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.proj-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  color: var(--text-dim);
  margin-right: 0.4rem;
}

.proj-badge-status {
  color: var(--accent);
  border-color: rgba(200,255,0,0.15);
}

.proj-link {
  font-size: 0.72rem;
  color: var(--accent);
}

.proj-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.proj-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.proj-card > p:not(.proj-sub):not(.proj-vision) {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  height: calc(1.6em * 3);
  overflow: hidden;
}

.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.proj-tech span {
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(200,255,0,0.12);
  border-radius: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.proj-vision {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 0.6rem;
  margin-top: auto;
}

.proj-arrow {
  font-family: var(--mono);
  font-size: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  transition: all var(--transition);
}

.proj-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.projects-gallery {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.projects-gallery .project-small {
  background: var(--bg-alt);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.projects-gallery .project-small:hover {
  background: var(--bg-card-hover);
  border-left: 2px solid var(--accent);
  box-shadow: inset 0 0 20px rgba(200, 255, 0, 0.03);
}

.projects-gallery .project-small h4 {
  font-size: 0.85rem;
  font-weight: 500;
}

.projects-gallery .project-small p {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.projects-gallery .project-small .project-status {
  font-size: 0.55rem;
  margin: 0;
}

.projects-gallery .project-small .project-tech {
  display: none;
}

/* --- pub scroll --- */
.pub-scroll {
  max-height: calc(5.5 * 68px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-card);
}

.pub-scroll::-webkit-scrollbar {
  width: 4px;
}

.pub-scroll::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 2px;
}

.pub-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

.pub-lab {
  font-size: 0.6rem;
  color: var(--accent);
  text-transform: lowercase;
  white-space: nowrap;
  min-width: 90px;
  flex-shrink: 0;
}

/* --- mentor + contact merged grid --- */
.mentor-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}

/* --- social pills --- */
.social-pills {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.social-pill {
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- square buttons --- */
.btn-sq {
  padding: 0.85rem 0.85rem;
  min-width: 0;
}

/* --- hero square buttons override --- */
.hero-links .btn {
  padding: 0.85rem 1rem;
}

/* --- tighter leadership spacing --- */
#leadership .subsection-label:first-of-type {
  margin-top: 0;
}

#leadership .section-label {
  margin-bottom: 1rem;
}

/* --- responsive additions --- */
@media (max-width: 900px) {
  .hero-layout {
    flex-direction: column;
  }
  .hero-gear-area {
    display: none;
  }
  .hero-links .btn {
    flex: none;
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-small-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card {
    min-width: 300px;
  }

  .project-card-featured {
    min-width: 340px;
  }

  .pub-item {
    flex-direction: column;
    gap: 0.35rem;
  }

  .mentor-contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .projects-layout {
    grid-template-columns: 1fr;
  }

  .clinical-grid-2,
  .clinical-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* hide pond toggle + links button on mobile (no section ponds) */
  .nav-buttons {
    display: none;
  }

  /* project viewer: stack, hide arrows, scrollable tabs */
  .proj-viewer {
    grid-template-columns: 1fr;
  }
  .proj-arrow {
    display: none;
  }
  .proj-sidebar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .proj-sidebar::-webkit-scrollbar {
    display: none;
  }
  .proj-tab {
    min-width: 110px;
  }
  .proj-card > p:not(.proj-sub):not(.proj-vision) {
    height: auto;
    overflow: visible;
  }

  /* hero pond: smaller on tablets */
  .ripple-label {
    display: none;
  }
}

@media (max-width: 640px) {
  .status-bar {
    font-size: 0.65rem;
  }

  .status-bar-inner {
    padding: 0 1.25rem;
  }

  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card {
    min-width: 280px;
  }

  .project-card-featured {
    min-width: 300px;
  }

  .projects-small-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* more room between form and footer on mobile */
  #mentorship > .container {
    padding-bottom: 8rem;
  }

  /* inline footer stacks */
  .inline-footer-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

@media (max-width: 414px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .proj-tab {
    min-width: 90px;
    padding: 0.5rem 0.6rem;
  }
  .proj-tab-desc {
    display: none;
  }

  /* hero sub text tighter */
  .hero-sub {
    font-size: 0.82rem;
  }

  /* pub items tighter */
  .pub-item {
    padding: 0.9rem 1rem;
    gap: 0.5rem;
  }
}

/* reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
