/* ============================================================
   Hugo Ruiz — "Dark Research Lab"
   A vision-model console: near-black surfaces, detection-lime +
   data-cyan accents, Space Grotesk / JetBrains Mono, bounding-box
   framing and mono telemetry. Dark-only by design.
   ============================================================ */

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

/* ─── TOKENS ─── */
:root {
  --bg:         #0B0E11;   /* near-black base            */
  --surface:    #14181D;   /* elevated surface           */
  --panel:      #171C22;   /* raised panels / cards      */
  --panel-2:    #1B2129;   /* inputs / inner wells       */
  --border:     #232B34;   /* hairlines, panel edges     */
  --border-2:   #2E3742;   /* stronger dividers          */
  --ink:        #E9EDF2;   /* bright foreground          */
  --ink-dim:    #C4CBD3;   /* secondary heading ink      */
  --muted:      #8E99A6;   /* body secondary (AA ~6.7:1) */
  --lime:       #34E27A;   /* detection green — primary  */
  --lime-deep:  #12351F;   /* lime wash for fills        */
  --cyan:       #4CD6F0;   /* data / heatmap secondary   */

  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --maxw: 1140px;
  --pad:  2.75rem;
  --pad-m: 1.4rem;
  --nav-h: 66px;
  --r:    10px;
  --r-sm: 6px;

  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Faint technical graticule + edge vignette, fixed behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right,  rgba(142,153,166,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(142,153,166,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(60% 45% at 78% -5%, rgba(76,214,240,0.10), transparent 60%),
    radial-gradient(55% 40% at 12% 8%, rgba(52,226,122,0.08), transparent 62%);
  pointer-events: none;
}

/* ─── HELPERS ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 300;
  background: var(--lime); color: #06140B;
  padding: 0.65rem 1rem; border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 0.8rem; font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  width: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: rgba(52,226,122,0.28); color: #fff; }

* { -webkit-tap-highlight-color: transparent; }

/* ─── MONO UTILITIES (labels / telemetry / data) ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(52,226,122,0.16);
}

.mono { font-family: var(--mono); }

/* Reusable "readout" tag: mono key:value chip */
.readout {
  display: inline-flex; align-items: baseline; gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.readout b { color: var(--ink); font-weight: 500; }
.readout .v { color: var(--cyan); font-weight: 500; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em;
}
.nav-logo .mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--mono); font-weight: 700; font-size: 0.82rem;
  letter-spacing: -0.03em;
  background: rgba(52,226,122,0.07);
}

.nav-right { display: flex; align-items: center; gap: 1.6rem; }

.nav-menu { display: flex; gap: 1.9rem; list-style: none; }
.nav-menu a {
  font-family: var(--mono);
  font-size: 0.76rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 0.18s ease;
}
.nav-menu a:hover,
.nav-menu a[aria-current="page"] { color: var(--lime); }

.nav-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.34rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border-2);
  white-space: nowrap;
}
.nav-status::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  animation: pulse 2.4s ease-in-out infinite;
}

.lang-switch {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
}
.lang-switch a { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.lang-switch a:hover { color: var(--lime); }
.lang-switch .on { color: var(--lime); }
.lang-switch .sep { color: var(--border-2); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border-2);
  border-radius: var(--r-sm); color: var(--ink); cursor: pointer;
  touch-action: manipulation;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle:hover { border-color: var(--lime); color: var(--lime); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
}
.btn-primary { background: var(--lime); color: #06140B; }
.btn-primary:hover { background: #4dee8c; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ─── SECTION SCAFFOLD ─── */
.section { padding-block: 5.5rem; }
.section-head { margin-bottom: 2.75rem; }
.section-head h2 { margin-top: 0.9rem; }

h2 {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  line-height: 1.12; letter-spacing: -0.025em;
  color: var(--ink);
}
h3 { font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }

/* ─── DETECTION FRAME (signature) ─── */
/* Wrap any block; four corner brackets + optional readout tag.   */
.frame { position: relative; }
.frame-corner {
  position: absolute; width: 16px; height: 16px; z-index: 3;
  border: 2px solid var(--lime); pointer-events: none;
}
.frame-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.frame-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.frame-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.frame-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.frame-tag {
  position: absolute; top: -0.85rem; left: 0.9rem; z-index: 4;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.2rem 0.6rem;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.03em;
  background: var(--lime); color: #06140B;
  border-radius: 4px; white-space: nowrap;
}

/* ─── HERO (home) ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-block: calc(var(--nav-h) + 3.5rem) 4rem;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem; align-items: center;
}

.hero-eyebrow { margin-bottom: 1.6rem; opacity: 0; animation: fadeUp 0.7s ease 0.05s forwards; }

.hero h1 {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(2.9rem, 6.4vw, 5rem);
  line-height: 1.0; letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
  opacity: 0; animation: fadeUp 0.7s ease 0.15s forwards;
}
.hero h1 .accent { color: var(--lime); }

.hero-sub {
  font-size: 1.1rem; color: var(--muted); max-width: 40ch;
  margin-bottom: 2rem;
  opacity: 0; animation: fadeUp 0.7s ease 0.28s forwards;
}
.hero-sub strong { color: var(--ink-dim); font-weight: 500; }

.hero-telemetry {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; flex-direction: column;
  padding: 1rem 0 1.9rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1.9rem;
  opacity: 0; animation: fadeUp 0.7s ease 0.4s forwards;
}

.hero-actions {
  display: flex; gap: 0.8rem; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.7s ease 0.52s forwards;
}

/* framed portrait as a "detected subject" */
.hero-detect {
  justify-self: center;
  opacity: 0; animation: fadeUp 0.8s ease 0.35s forwards;
}
.hero-portrait {
  position: relative; width: min(340px, 74vw);
  padding: 12px;
}
.hero-portrait img {
  display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--r-sm);
  filter: grayscale(1) contrast(1.05) brightness(0.98);
}
.hero-portrait .scan {
  position: absolute; inset: 12px; border-radius: var(--r-sm);
  background: linear-gradient(180deg, transparent 0%, rgba(52,226,122,0.14) 50%, transparent 100%);
  mix-blend-mode: screen; pointer-events: none;
  animation: scan 5.5s ease-in-out infinite;
}
.hero-glow {
  position: absolute; inset: -18% -14%; z-index: -1;
  background:
    radial-gradient(38% 42% at 30% 30%, rgba(76,214,240,0.42), transparent 70%),
    radial-gradient(40% 40% at 72% 62%, rgba(52,226,122,0.40), transparent 70%),
    radial-gradient(35% 35% at 60% 20%, rgba(150,90,240,0.30), transparent 72%);
  filter: blur(38px); opacity: 0.55;
  animation: drift 14s ease-in-out infinite alternate;
}

/* ─── BENTO OVERVIEW (home) ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.9rem;
  position: relative;
  transition: border-color 0.2s ease;
}
.cell:hover { border-color: var(--border-2); }
.cell-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--cyan);
  margin-bottom: 1rem;
}
.cell-bio { grid-column: span 2; }
.cell-bio p { color: var(--muted); font-size: 0.97rem; max-width: 60ch; }
.cell-bio p + p { margin-top: 0.9rem; }
.cell-bio h3 { font-size: 1.35rem; margin-bottom: 1.1rem; line-height: 1.2; }
.cell-bio em { font-style: normal; color: var(--lime); }

.spec-list { display: flex; flex-direction: column; gap: 0.72rem; }
.spec-item {
  display: flex; align-items: flex-start; gap: 0.7rem;
  font-size: 0.86rem; color: var(--ink-dim);
}
.spec-item::before {
  content: '›'; color: var(--lime); font-family: var(--mono);
  font-weight: 600; line-height: 1.4;
}

.cell-affil { display: flex; flex-direction: column; justify-content: space-between; }
.affil-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.4rem; }

/* ─── PROJECT CARDS (home) ─── */
.proj-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.proj-card {
  position: relative; display: block;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--r); padding: 2rem;
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.proj-card:hover { border-color: var(--lime); background: var(--surface); transform: translateY(-3px); }
.proj-card:active { transform: translateY(0); }
/* bounding-box corner brackets appear on hover/focus */
.proj-card::before,
.proj-card::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--lime); opacity: 0;
  transition: opacity 0.22s ease; pointer-events: none;
}
.proj-card::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.proj-card::after  { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.proj-card:hover::before, .proj-card:hover::after,
.proj-card:focus-visible::before, .proj-card:focus-visible::after { opacity: 1; }

.proj-num {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--cyan); margin-bottom: 1.4rem;
}
.proj-title { font-size: 1.24rem; line-height: 1.2; margin-bottom: 0.7rem; }
.proj-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.proj-foot {
  margin-top: 1.6rem; display: flex; align-items: center; justify-content: space-between;
}
.proj-tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--lime);
}
.proj-arrow { color: var(--muted); transition: transform 0.2s ease, color 0.2s ease; }
.proj-card:hover .proj-arrow { color: var(--lime); transform: translate(3px, -3px); }

/* ─── CONTACT BAND ─── */
.band {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r);
  background:
    radial-gradient(80% 140% at 85% -20%, rgba(76,214,240,0.10), transparent 60%),
    radial-gradient(70% 120% at 5% 120%, rgba(52,226,122,0.10), transparent 60%),
    var(--surface);
  padding: 3.4rem;
  text-align: center;
}
.band .eyebrow { margin-bottom: 1rem; }
.band h2 { margin-bottom: 0.8rem; }
.band p { color: var(--muted); max-width: 44ch; margin: 0 auto 2rem; }

/* ─── FOOTER ─── */
footer { border-top: 1px solid var(--border); margin-top: 5rem; }
.footer-inner {
  padding-block: 2.2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
}
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.18s ease; }
.footer-links a:hover { color: var(--lime); }

/* ─── INTERIOR PAGE HEADER ─── */
.page-header {
  padding-block: calc(var(--nav-h) + 4rem) 2.5rem;
  opacity: 0; animation: fadeUp 0.7s ease 0.08s forwards;
}
.page-header h1 {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  line-height: 1.02; letter-spacing: -0.03em;
  margin: 0.9rem 0 1rem;
}
.page-header > p { color: var(--muted); font-size: 1.02rem; max-width: 56ch; }

/* ─── PROJECTS PAGE ─── */
.project-entry {
  display: grid; grid-template-columns: 150px 1fr; gap: 2.6rem;
  padding: 2.2rem 0;
  scroll-margin-top: 90px;
}
.project-entry + .project-entry { border-top: 1px solid var(--border); }
.project-side { padding-top: 0.4rem; }
.project-year-lg {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--cyan);
  padding-bottom: 0.7rem; border-bottom: 1px solid var(--border);
}
.project-index {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  margin-top: 0.7rem;
}
.project-body { min-width: 0; }
.project-meta { margin-bottom: 0.9rem; }
.project-entry h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.95rem); line-height: 1.12;
  margin-bottom: 1rem;
}
.project-body > p { color: var(--muted); font-size: 0.97rem; max-width: 62ch; margin-bottom: 1.1rem; }

.project-points { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.project-points li {
  font-size: 0.9rem; color: var(--ink-dim); padding-left: 1.4rem; position: relative;
}
.project-points li::before {
  content: '›'; position: absolute; left: 0; color: var(--lime);
  font-family: var(--mono); font-weight: 600;
}
.project-points em { font-style: normal; color: var(--ink); }

.project-tech { margin-top: 1.5rem; }
.project-tech, .affil-tags, .sizes-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-pill {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em;
  padding: 0.32rem 0.72rem; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); color: var(--muted);
  background: var(--panel-2);
}

.related-pubs {
  margin-top: 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem;
}
.related-pubs-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.related-pubs a {
  font-family: var(--mono); font-size: 0.78rem; color: var(--cyan);
  text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.related-pubs a:hover { border-bottom-color: var(--cyan); }

.cta { padding-block: 4rem 1rem; }

/* ─── PUBLICATIONS PAGE ─── */
.pub-group { margin-top: 2.5rem; }
.pub-group + .pub-group { margin-top: 3.5rem; }
.pub-group-title {
  display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 0.8rem; border-bottom: 1px solid var(--border);
}
.pub-group-title .count { color: var(--lime); }

.pub-entry {
  position: relative;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
  transition: background 0.3s ease;
}
.pub-entry::before {
  content: ''; position: absolute; left: 0; top: 1.65rem; bottom: 1.65rem;
  width: 2px; background: var(--border-2); transition: background 0.3s ease;
}
.pub-entry:hover::before { background: var(--lime); }
.pub-entry:target { background: var(--surface); box-shadow: -1.4rem 0 0 var(--surface), 1.4rem 0 0 var(--surface); }
.pub-entry:target::before { background: var(--lime); }

.pub-meta { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 0.55rem; flex-wrap: wrap; }
.pub-year { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: var(--cyan); font-variant-numeric: tabular-nums; }
.pub-venue {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border-2); border-radius: 999px; padding: 0.16rem 0.62rem;
}
.pub-title { font-size: 1.12rem; font-weight: 500; line-height: 1.3; color: var(--ink); margin-bottom: 0.85rem; }

.pub-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pub-link, .pub-pdf {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; padding: 0.4rem 0.8rem; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.pub-link:hover { border-color: var(--cyan); color: var(--cyan); }
.pub-pdf { border-color: color-mix(in srgb, var(--lime) 55%, var(--border-2)); color: var(--lime); }
.pub-pdf:hover { background: var(--lime); border-color: var(--lime); color: #06140B; }

/* ─── LSSD PAGE ─── */
.lssd-lead { font-size: 1.1rem; color: var(--muted); max-width: 66ch; }
.lssd-lead strong { color: var(--ink); font-weight: 500; }

.lssd-section { margin-top: 3.2rem; }
.lssd-section > h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 1rem; }
.lssd-section > h2::before {
  content: '// '; font-family: var(--mono); color: var(--lime); font-weight: 600;
  font-size: 0.9em;
}
.lssd-section > p { color: var(--muted); font-size: 0.98rem; max-width: 66ch; }
.lssd-section > p em { font-style: normal; color: var(--ink-dim); }

.lssd-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.lssd-card {
  display: block; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--panel); text-decoration: none; color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lssd-card:hover { border-color: var(--lime); transform: translateY(-3px); }
.lssd-card-k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.lssd-card-t { font-family: var(--mono); font-size: 0.98rem; font-weight: 500; margin: 0.5rem 0 0.4rem; color: var(--ink); }
.lssd-card-d { font-size: 0.85rem; color: var(--muted); }
.lssd-card code { font-family: var(--mono); font-size: 0.86em; color: var(--lime); }

/* figures — inline, framed like detections */
.lssd-figure-wide { max-width: 880px; margin: 1.8rem auto 0; }
.lssd-figure-wide img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--panel);
}
.lssd-figure-wide figcaption {
  font-family: var(--mono); font-size: 0.74rem; color: var(--muted);
  margin-top: 0.7rem; text-align: center;
}
.lssd-samples { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.4rem; }
.lssd-samples figure { margin: 0; width: 156px; }
.lssd-samples .thumb { position: relative; }
.lssd-samples img {
  width: 156px; height: 156px; object-fit: cover; display: block;
  border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--panel);
}
.lssd-samples .thumb::before,
.lssd-samples .thumb::after {
  content: ''; position: absolute; width: 12px; height: 12px; border: 2px solid var(--cyan);
}
.lssd-samples .thumb::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.lssd-samples .thumb::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }
.lssd-samples figcaption {
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
  margin-top: 0.5rem; line-height: 1.4;
}

.table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--r); }
.lssd-table { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 0.88rem; }
.lssd-table th, .lssd-table td { text-align: left; padding: 0.72rem 1rem; border-bottom: 1px solid var(--border); }
.lssd-table thead th {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 500; color: var(--muted); background: var(--panel);
}
.lssd-table td { color: var(--muted); font-variant-numeric: tabular-nums; }
.lssd-table td:first-child { color: var(--ink); }
.lssd-table tbody tr:last-child td { border-bottom: none; }
.lssd-table tbody tr:hover td { background: var(--panel); }

.code-block {
  margin-top: 1rem; padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  border-left: 3px solid var(--lime);
  overflow-x: auto; font-family: var(--mono); font-size: 0.82rem;
  color: var(--ink-dim); line-height: 1.7; white-space: pre;
}

.citation {
  margin-top: 1rem; padding: 1.2rem 1.4rem;
  border-left: 3px solid var(--cyan); background: var(--panel);
  font-size: 0.92rem; color: var(--muted); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.citation strong { color: var(--ink); font-weight: 500; }
.citation em { color: var(--ink-dim); font-style: italic; }

.sizes-list { margin-top: 1rem; }

/* ─── CONTACT PAGE ─── */
.contact-main {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem;
  padding-block: calc(var(--nav-h) + 4rem) 4rem;
}
.contact-intro { opacity: 0; animation: fadeUp 0.7s ease 0.1s forwards; }
.contact-intro h1 {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 3.3rem); line-height: 1.05; letter-spacing: -0.03em;
  margin: 0.9rem 0 1.2rem;
}
.contact-intro h1 .accent { color: var(--lime); }
.contact-intro > p { color: var(--muted); font-size: 1rem; max-width: 42ch; margin-bottom: 2.4rem; }

.contact-links { display: flex; flex-direction: column; }
.contact-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--ink); transition: padding-left 0.2s ease, color 0.2s ease;
}
.contact-link:first-child { border-top: 1px solid var(--border); }
.contact-link:hover { color: var(--lime); padding-left: 0.5rem; }
.contact-link-left { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.contact-link-platform { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.contact-link-value { font-size: 0.98rem; }
.contact-link-arrow { color: var(--muted); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.contact-link:hover .contact-link-arrow { transform: translate(3px, -3px); color: var(--lime); }

.contact-form-wrapper {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--r);
  padding: 2.2rem; opacity: 0; animation: fadeUp 0.7s ease 0.24s forwards;
}
.contact-form-wrapper h2 { font-size: 1.3rem; margin-bottom: 1.8rem; }
.form-group { margin-bottom: 1.3rem; }
label {
  display: block; font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem;
}
input, textarea {
  width: 100%; padding: 0.8rem 0.9rem;
  font-family: var(--sans); font-size: 16px; font-weight: 400;
  background: var(--panel-2); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  color: var(--ink); outline: none; transition: border-color 0.2s ease;
  -webkit-appearance: none;
}
input::placeholder, textarea::placeholder { color: #5c6570; }
input:focus, textarea:focus { border-color: var(--lime); }
textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.btn-submit {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-family: var(--mono);
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--lime); color: #06140B; border: none; border-radius: var(--r-sm); cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease; touch-action: manipulation;
}
.btn-submit:hover { background: #4dee8c; transform: translateY(-2px); }
.btn-submit:active { transform: translateY(0); }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(52,226,122,0.5); } 50% { box-shadow: 0 0 0 5px rgba(52,226,122,0); } }
@keyframes scan { 0%,100% { transform: translateY(-46%); opacity: 0; } 45%,55% { opacity: 1; } 50% { transform: translateY(46%); } }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-4%, 3%) scale(1.06); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 940px) {
  .nav-status { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-detect { order: -1; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-bio { grid-column: span 2; }
}

@media (max-width: 720px) {
  :root { --pad: var(--pad-m); }

  .nav-menu {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 1.4rem;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 1.6rem var(--pad-m); display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { font-size: 0.9rem; }
  .nav-toggle { display: inline-flex; }
  .nav-right { gap: 0.75rem; }

  .bento { grid-template-columns: 1fr; }
  .cell-bio { grid-column: auto; }
  .proj-grid { grid-template-columns: 1fr; }

  .project-entry { grid-template-columns: 1fr; gap: 1rem; }
  .project-side { display: flex; align-items: center; gap: 1rem; padding-top: 0; }
  .project-year-lg { border-bottom: none; padding-bottom: 0; }
  .project-index { margin-top: 0; }

  .contact-main { grid-template-columns: 1fr; gap: 2.6rem; }
  .band { padding: 2.4rem 1.6rem; }

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-eyebrow, .hero h1, .hero-sub, .hero-telemetry, .hero-actions, .hero-detect,
  .page-header, .contact-intro, .contact-form-wrapper { opacity: 1 !important; }
  .hero-portrait .scan, .hero-glow { display: none; }
}
