/* Hallmark · macrostructure: Long Document · genre: dark-tech · theme: Terminal
 * nav: N1a-minimal · footer: Ft1-statement
 * DESIGN_VARIANCE: 6 · MOTION_INTENSITY: 7 · VISUAL_DENSITY: 4
 * pre-emit critique: P5 H5 E5 S5 R5 V5
 */

/* ══════════════════════════════════════════
   DESIGN TOKENS — Dark (default)
══════════════════════════════════════════ */
:root {
  /* Color — OKLCH, single phosphor-green accent */
  --bg:              oklch(8%  0.005 250);
  --surface:         oklch(12% 0.007 250);
  --border:          oklch(22% 0.010 250);
  --border-dim:      oklch(15% 0.007 250);
  --text:            oklch(94% 0.004  90);
  --muted:           oklch(80% 0.006 250);
  --muted-dim:       oklch(62% 0.008 250);
  --accent:          oklch(72% 0.180 145);
  --accent-dim:      oklch(52% 0.130 145);
  --accent-glow:     oklch(72% 0.180 145 / 0.10);
  --nav-glass:       oklch(8%  0.005 250 / 0.90);

  /* Typography */
  --f-display: 'JetBrains Mono', 'Courier New', monospace;
  --f-body:    'Geist', 'DM Sans', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --nav-h:  56px;
  --max-w:  900px;

  /* Easing — transitions-dev tokens */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-pop:  cubic-bezier(0.34, 1.36, 0.64, 1);

  --t-fast:   150ms var(--ease-out);
  --t-mid:    300ms var(--ease-out);
  --t-slow:   650ms var(--ease-out);

  /* transitions-dev universal install */
  --resize-dur: 300ms;
  --resize-ease: var(--ease-out);
  --icon-swap-dur: 200ms;
  --icon-swap-blur: 2px;
  --icon-swap-start-scale: 0.25;
  --icon-swap-ease: ease-in-out;
  --text-swap-dur: 200ms;
  --text-swap-translate-y: 8px;
  --text-swap-blur: 2px;
  --text-swap-ease: ease-out;
}

/* ══════════════════════════════════════════
   LIGHT MODE — cream premium researcher
   Accent: deep indigo ink (academic journal)
══════════════════════════════════════════ */
:root[data-theme="light"] {
  --bg:          oklch(97%  0.010  80);
  --surface:     oklch(93%  0.012  80);
  --border:      oklch(82%  0.014  80);
  --border-dim:  oklch(90%  0.009  80);
  --text:        oklch(16%  0.010  60);
  --muted:       oklch(44%  0.010  70);
  --muted-dim:   oklch(63%  0.008  70);
  --accent:      oklch(33%  0.140 265);
  --accent-dim:  oklch(50%  0.110 265);
  --accent-glow: oklch(33%  0.140 265 / 0.08);
  --nav-glass:   oklch(97%  0.010  80 / 0.90);
}

/* Light mode avatar — warmer, slightly brighter, no border */
:root[data-theme="light"] .avatar-photo {
  filter: grayscale(1) contrast(1.05) brightness(1.08) sepia(0.06);
  opacity: 0.88;
  border: none;
}
:root[data-theme="light"] .avatar-photo:hover {
  filter: grayscale(0.15) contrast(1.02) brightness(1.1);
  opacity: 0.98;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scrollbar-color: var(--border) var(--bg);
  scrollbar-width: thin;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection    { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a              { color: inherit; text-decoration: none; }
img            { display: block; max-width: 100%; }

/* ══════════════════════════════════════════
   KEYFRAMES
══════════════════════════════════════════ */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

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

/* ══════════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html    { scroll-behavior: auto; }
}

/* ══════════════════════════════════════════
   NAV  (N1a-minimal)
══════════════════════════════════════════ */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(20px, 5vw, 40px);
  background: var(--nav-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--border-dim);
}

.nav-wordmark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
}
.nav-wordmark .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  position: relative;
  transition: color var(--t-fast);
}

/* Sliding underline on hover / active */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-mid);
}
.nav-links a:hover            { color: var(--text); }
.nav-links a:hover::after     { transform: scaleX(1); }
.nav-links a.is-active        { color: var(--accent); }
.nav-links a.is-active::after { transform: scaleX(1); }

/* Theme toggle button */
.theme-toggle {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  color: var(--muted-dim);
  background: none;
  border: 1px solid var(--border-dim);
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
  margin-left: 20px;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border);
}

/* ══════════════════════════════════════════
   LAYOUT SHELL
══════════════════════════════════════════ */
main {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

section {
  padding-block: 80px 64px;
  scroll-margin-top: var(--nav-h);
  border-top: 1px solid var(--border-dim);
}
section:first-of-type { border-top: none; }

/* Section marker — runs across with a fading rule */
.section-marker {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-marker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-dim), transparent);
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
#top {
  padding-top:  calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 1fr 188px;
  gap: 40px;
  align-items: start;
}

/* Hero text (markdown content) */
.hero-text h1 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(26px, 4.5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}
/* Blinking cursor after name */
.hero-text h1::after {
  content: '_';
  color: var(--accent);
  animation: blink-cursor 1.2s step-start infinite;
}

/* Role label — first p, wraps a strong */
.hero-text > p:nth-of-type(1) {
  margin-bottom: 20px;
}
.hero-text > p:nth-of-type(1) > strong {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Bio */
.hero-text > p:nth-of-type(2) {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 52ch;
  margin-bottom: 24px;
}

/* Contact links list */
.hero-text > ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 28px;
}
.hero-text > ul li {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted-dim);
  border: 1px solid var(--border-dim);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
}
.hero-text > ul li:has(a) {
  padding: 0;
  border: none;
}
.hero-text > ul li:not(:has(a))::before {
  content: '⚲';
  color: var(--accent-dim);
  margin-right: 6px;
  font-size: 12px;
}
.hero-text > ul li a {
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.hero-text > ul li a img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  filter: invert(1) opacity(0.6);
  transition: opacity var(--t-fast);
}
:root[data-theme="light"] .hero-text > ul li a img {
  filter: invert(0) opacity(0.5);
}
.hero-text > ul li a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}
.hero-text > ul li a:hover img {
  filter: invert(1) opacity(1);
}
:root[data-theme="light"] .hero-text > ul li a:hover img {
  filter: invert(0) opacity(0.9);
}

/* "Now" statement — last p, has a strong for the label */
.hero-text > p:last-of-type {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 52ch;
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}
.hero-text > p:last-of-type > strong {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ══════════════════════════════════════════
   AVATAR
══════════════════════════════════════════ */
.avatar-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.avatar-photo {
  width: 188px;
  height: 188px;
  object-fit: cover;
  object-position: center 12%;
  filter: grayscale(1) contrast(1.12) brightness(0.80);
  opacity: 0.78;
  border: 1px solid var(--border);
  transition: filter 0.6s ease, opacity 0.6s ease;
}
.avatar-photo:hover {
  filter: grayscale(0.2) contrast(1.08) brightness(0.95);
  opacity: 0.96;
}

.avatar-location {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.avatar-location span {
  color: var(--accent-dim);
  font-size: 12px;
}

/* ══════════════════════════════════════════
   HIDE MARKDOWN SECTION H2
   (we use .section-marker instead)
══════════════════════════════════════════ */
.md-body > h2:first-child { display: none; }

/* ══════════════════════════════════════════
   EXPERIENCE ENTRIES
   (JS wraps each h3-group in .exp-entry)
══════════════════════════════════════════ */
.exp-entry {
  padding-left: 20px;
  border-left: 1px solid var(--border-dim);
  margin-bottom: 40px;
  transition: border-left-color var(--t-mid);
}
.exp-entry:last-child  { margin-bottom: 0; }
.exp-entry:hover       { border-left-color: var(--accent); }

.exp-entry h3 {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.exp-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.exp-meta em { font-style: normal; }

.exp-entry ul { list-style: none; }
.exp-entry ul li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  padding-bottom: 4px;
}
.exp-entry ul li::before {
  content: '=>';
  position: absolute;
  left: 0;
  color: var(--accent-dim);
  font-family: var(--f-mono);
  font-size: 12px;
}
.exp-entry ul li strong {
  color: var(--text);
  font-weight: 500;
}

/* ══════════════════════════════════════════
   PROJECT BLOCKS
   (JS wraps each h3-group in .project-block)
══════════════════════════════════════════ */
.project-block {
  padding: 20px 22px;
  border: 1px solid var(--border-dim);
  margin-bottom: 14px;
  transition: border-color var(--t-mid), background var(--t-mid);
  cursor: default;
}
.project-block:last-child { margin-bottom: 0; }
.project-block:hover {
  border-color: var(--border);
  background: var(--surface);
}

.project-block h3 {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}
.project-block h3 a {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  border: none;
  padding: 0;
  margin: 0;
  display: inline;
  transition: color var(--t-fast);
}
.project-block h3 a:hover {
  color: var(--accent);
  background: none;
}

.proj-date {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  margin-bottom: 10px;
}
.proj-date em { font-style: normal; }

.project-block > p:not(.proj-date) {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.75;
  max-width: none;
  margin-bottom: 16px;
}

.project-block ul {
  list-style: none;
  border-top: 1px solid var(--border-dim);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-block ul li {
  position: relative;
  padding-left: 20px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  line-height: 1.7;
  transition: color var(--t-mid);
}
.project-block ul li::before {
  content: '=>';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--accent-dim);
  font-family: var(--f-mono);
  font-size: 10px;
  transition: color var(--t-mid), transform var(--t-mid);
}
.project-block ul li strong {
  color: var(--accent-dim);
  font-weight: 400;
  transition: color var(--t-mid);
}

/* Card hover - list items shine */
.project-block:hover ul li {
  color: var(--muted);
}
.project-block:hover ul li::before {
  color: var(--accent);
  transform: translateX(2px);
}
.project-block:hover ul li strong {
  color: var(--accent);
}

.project-block a {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--border-dim);
  padding: 3px 10px;
  margin-right: 8px;
  display: inline-block;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.project-block a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ══════════════════════════════════════════
   SKILLS TABLE — restyled as clean rows
══════════════════════════════════════════ */
.md-body table  { width: 100%; border-collapse: collapse; }
.md-body thead  { display: none; }
.md-body tbody tr {
  display: grid;
  grid-template-columns: 152px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border-dim);
  align-items: baseline;
}
.md-body td:first-child {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.md-body td:first-child strong { font-weight: 400; }
.md-body td:last-child {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
}

/* ══════════════════════════════════════════
   BACKGROUND
══════════════════════════════════════════ */
#background .md-body h3 {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-top: 40px;
  margin-bottom: 16px;
}
#background .md-body h3:first-of-type { margin-top: 0; }

#background .md-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}
#background .md-body p strong {
  color: var(--text);
  font-weight: 500;
}

#background .md-body ul { list-style: none; }
#background .md-body ul li {
  position: relative;
  padding: 11px 0 11px 20px;
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--border-dim);
  line-height: 1.7;
}
#background .md-body ul li:first-child { border-top: none; }
#background .md-body ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-size: 18px;
  line-height: 1.35;
}
#background .md-body ul li strong {
  color: var(--text);
  font-weight: 500;
}

/* ══════════════════════════════════════════
   CONTACT
══════════════════════════════════════════ */
#contact .md-body > p:first-of-type {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

#contact .md-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 72px;
}
#contact .md-body ul li a {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: color var(--t-fast);
}
#contact .md-body ul li a img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: invert(1) opacity(0.6);
  transition: transform var(--t-fast), filter var(--t-fast), opacity var(--t-fast);
}
:root[data-theme="light"] #contact .md-body ul li a img {
  filter: invert(0) opacity(0.5);
}
#contact .md-body ul li a:hover { color: var(--accent); }
#contact .md-body ul li a:hover img {
  filter: invert(1) opacity(1);
  transform: scale(1.1);
}
:root[data-theme="light"] #contact .md-body ul li a:hover img {
  filter: invert(0) opacity(0.9);
  transform: scale(1.1);
}

#contact .md-body ul li em {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 11px;
  color: var(--muted-dim);
  margin-left: 8px;
}

/* Footer attribution */
#contact .md-body > p:last-child {
  padding-top: 40px;
  border-top: 1px solid var(--border-dim);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted-dim);
}
#contact .md-body > p:last-child em { font-style: normal; }
#contact .md-body > p:last-child a  {
  color: var(--accent-dim);
  transition: color var(--t-fast);
}
#contact .md-body > p:last-child a:hover { color: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE — 640px breakpoint
══════════════════════════════════════════ */
@media (max-width: 640px) {
  #top {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 48px);
    gap: 32px;
  }
  .avatar-wrap {
    position: static;
    align-items: flex-start;
  }
  .avatar-location {
    justify-content: flex-start;
    margin-left: 2px;
  }
  .avatar-photo { width: 120px; height: 120px; }

  .nav-links         { display: none; }

  .md-body tbody tr  { grid-template-columns: 1fr; gap: 4px; }

  .project-block { padding: 16px; }
  .exp-entry     { padding-left: 14px; }
}

@media (max-width: 400px) {
  main    { padding-inline: 16px; }
  section { padding-block: 60px 48px; }
}

/* ══════════════════════════════════════════
   SEARCH MODAL — macOS Spotlight Style
   - Glassmorphic translucent backdrop
   - Translucent dark overlay matching Terminal aesthetic
   - Adaptive dark/light styles
   - Responsive scaling
══════════════════════════════════════════ */
.search-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  transition: transform var(--t-fast), color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.search-fab:hover {
  transform: translateY(-2px);
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--border-dim);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), 0 0 8px var(--accent-glow);
}
.search-fab:active {
  transform: translateY(0);
}


.search-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease-out), visibility var(--t-fast) var(--ease-out);
}
.search-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background-color: oklch(4% 0.002 250 / 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity var(--t-fast);
}

.search-container {
  position: relative;
  width: 90%;
  max-width: 600px;
  background-color: oklch(10% 0.005 250 / 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.97);
  transition: transform var(--t-mid) var(--ease-pop);
}
.search-modal.is-open .search-container {
  transform: scale(1);
}

/* Light mode styles */
:root[data-theme="light"] .search-backdrop {
  background-color: oklch(98% 0.005 80 / 0.4);
}
:root[data-theme="light"] .search-container {
  background-color: oklch(95% 0.008 80 / 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03) inset;
  border-color: var(--border);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.search-icon {
  color: var(--muted-dim);
  display: flex;
  align-items: center;
}
#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--f-body);
  font-size: 17px;
  color: var(--text);
  padding: 0;
}
#searchInput::placeholder {
  color: var(--muted-dim);
}
.search-shortcut-hint {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--surface);
  user-select: none;
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  border-bottom: 1px solid var(--border-dim);
}
/* Scrollbar */
.search-results::-webkit-scrollbar {
  width: 6px;
}
.search-results::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.search-empty,
.search-no-results {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.search-item {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast);
  margin-bottom: 4px;
}
.search-item:last-child {
  margin-bottom: 0;
}
.search-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.search-item-title {
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.search-item-category {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--accent);
  text-transform: lowercase;
  opacity: 0.85;
}
.search-item-snippet {
  font-family: var(--f-body);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Active result styling matching macOS style */
.search-item.is-active {
  background-color: var(--accent);
  color: oklch(8% 0.005 250); /* Dark slate for high contrast text on green */
}
:root[data-theme="light"] .search-item.is-active {
  color: oklch(97% 0.010 80); /* Light cream/white text on deep indigo/blue */
  background-color: var(--accent);
}
.search-item.is-active .search-item-title,
.search-item.is-active .search-item-category,
.search-item.is-active .search-item-snippet {
  color: inherit;
  opacity: 1;
}

.search-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted-dim);
  background-color: var(--surface);
  user-select: none;
}
.search-footer kbd {
  background: var(--border-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  margin-right: 2px;
  font-size: 9px;
  font-family: var(--f-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  min-width: 16px;
  vertical-align: middle;
  line-height: 1;
  box-sizing: border-box;
}
.search-footer kbd .cmd-icon {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 11px;
  line-height: 1;
}

@keyframes highlight-glow {
  0% {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }
  100% {
    outline: 2px solid transparent;
    outline-offset: 4px;
  }
}
.search-highlight {
  animation: highlight-glow 2s var(--ease-out);
}
