/* ============================================================
   Tobias Francisty — portfolio · "Control Room"
   Refined dark operations console for a systems builder.
   Type: Bricolage Grotesque (display) · Inter (body)
         · JetBrains Mono (telemetry / data / labels)
   Accent: warm amber. Live signals: emerald, used sparingly.
   ============================================================ */

:root {
  --bg: #0e1116;
  --bg-2: #0b0e12;
  --panel: #161b22;
  --panel-2: #1c222b;
  --line: rgba(233, 236, 239, 0.09);
  --line-strong: rgba(233, 236, 239, 0.16);
  --text: #e8ecef;
  --muted: #8b95a3;
  --faint: #59626e;
  --accent: #f5a623;          /* warm amber */
  --accent-2: #ffbe4d;
  --accent-soft: rgba(245, 166, 35, 0.13);
  --live: #34d399;            /* emerald — live signals only */

  --maxw: 1140px;
  --r: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
strong, .work-card b { color: var(--text); font-weight: 600; }

.mono { font-family: "JetBrains Mono", monospace; font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }

/* faint control-room grid behind everything */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 100%,
    radial-gradient(120% 80% at 80% -10%, rgba(245,166,35,0.06), transparent 60%);
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 100%);
          mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 100%);
}

/* live status dot */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s var(--ease) infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem clamp(1.1rem, 4vw, 2rem);
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; }
.brand-mark { color: var(--accent); font-size: 0.8rem; }
.brand-name { font-family: "Bricolage Grotesque", sans-serif; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 1.7rem; }
.nav-links a { font-size: 0.93rem; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--live); background: rgba(52,211,153,0.06); }

/* ---------- scroll progress + scrollspy ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 8px rgba(245, 166, 35, 0.5);
  z-index: 60;
  will-change: transform;
  pointer-events: none;
}
.nav-links a.is-active { color: var(--accent); }
.nav-links a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 3px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- layout helpers ---------- */
.hero, .section, .telemetry { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1.1rem, 4vw, 2rem); scroll-margin-top: 72px; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.04em; color: var(--accent); margin: 0 0 1.6rem; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.1rem, 4vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 800;
  margin: 0 0 1.5rem;
}
.hero h1 .accent { display: inline; }
.lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.08rem;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s;
}
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.primary { background: var(--accent); color: #1a1205; }
.btn.primary:hover { background: var(--accent-2); transform: translateY(-2px); }
.btn.ghost { border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { font-size: 0.85rem; padding: 0.55rem 1rem; border-radius: 8px; }

/* ---------- console ---------- */
.console {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.console-dots { display: inline-flex; gap: 6px; }
.console-dots i { width: 9px; height: 9px; border-radius: 50%; background: #2c333d; }
.console-dots i:first-child { background: #3a2a18; }
.console-title { font-size: 0.76rem; color: var(--muted); }
.console-live {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; color: var(--live); letter-spacing: 0.08em; text-transform: uppercase;
}
.console-body { margin: 0; padding: 0.5rem 1.1rem; }
.console-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.62rem 0;
  border-bottom: 1px dashed var(--line);
}
.console-row:last-child { border-bottom: none; }
.console-row dt { font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; }
.console-row dd { margin: 0; font-size: 0.92rem; }
.clock { color: var(--accent); font-weight: 500; font-size: 1rem; }
.signal dd { display: flex; align-items: center; gap: 0.7rem; }

/* equalizer */
.equalizer { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.equalizer i {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: eq 1.1s var(--ease) infinite;
}
.equalizer i:nth-child(1) { height: 40%; animation-delay: -0.1s; }
.equalizer i:nth-child(2) { height: 75%; animation-delay: -0.5s; }
.equalizer i:nth-child(3) { height: 55%; animation-delay: -0.2s; }
.equalizer i:nth-child(4) { height: 95%; animation-delay: -0.7s; }
.equalizer i:nth-child(5) { height: 50%; animation-delay: -0.35s; }
.equalizer i:nth-child(6) { height: 80%; animation-delay: -0.6s; }
.equalizer i:nth-child(7) { height: 35%; animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }

.console-foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.18);
  font-size: 0.82rem;
  color: var(--muted);
}
.feri { border-radius: 8px; border: 1px solid var(--line-strong); }

/* ---------- telemetry strip ---------- */
.telemetry {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem clamp(1.1rem, 4vw, 2rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}
.telemetry b { color: var(--text); font-weight: 700; }
.telemetry .sep { color: var(--faint); }

/* ---------- section heads ---------- */
.section-head { margin-bottom: 2.4rem; }
.section-index {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.section-title { font-size: clamp(1.8rem, 4.5vw, 2.9rem); }
.section-sub { max-width: 56ch; color: var(--muted); margin: 0.9rem 0 0; }

/* ---------- work ---------- */
.work-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.work-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s var(--ease), border-color 0.2s, background 0.2s;
}
.work-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.work-card.featured {
  grid-column: 1 / -1;
  background:
    radial-gradient(80% 120% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--panel);
  border-color: rgba(245,166,35,0.25);
}
.work-top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.kind { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.badge {
  margin-left: auto;
  font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.55rem; border-radius: 100px;
  background: var(--accent-soft); color: var(--accent);
}
.work-card h3 { font-size: 1.5rem; margin-bottom: 0.55rem; }
.work-card.featured h3 { font-size: 1.9rem; }
.work-card p { color: var(--muted); font-size: 0.96rem; margin: 0 0 1.1rem; max-width: 60ch; }
.platforms { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.platform {
  font-size: 0.72rem;
  padding: 0.28rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  cursor: help;
  transition: border-color 0.2s, color 0.2s;
}
.platform:hover { border-color: var(--accent); color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tags span {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.work-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.2rem;
  font-weight: 600; font-size: 0.92rem; color: var(--accent);
}
.work-link .arrow { transition: transform 0.2s var(--ease); }
.work-link:hover .arrow { transform: translate(2px, -2px); }
.work-actions { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.work-note {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.work-note::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--faint);
}

/* live mini-flow widget — Automations card */
.auto-widget {
  margin: 0.1rem 0 1.1rem;
  padding: 0.75rem 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.auto-widget svg { width: 100%; height: auto; display: block; }
.auto-widget .wnode { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 1.3; }
.auto-widget .wtrigger { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.3; }
.auto-widget .wdecision { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.3; }
.auto-widget .wdone { fill: rgba(52, 211, 153, 0.1); stroke: var(--live); stroke-width: 1.3; }
.auto-widget .wedge {
  fill: none; stroke: var(--muted); stroke-width: 1.4;
  stroke-dasharray: 4 5;
  animation: wflow 0.9s linear infinite;
}
.auto-widget .warrow { fill: var(--accent); }
.auto-widget .wmark { fill: var(--accent); font: 700 14px "JetBrains Mono", monospace; }
.auto-widget .wq { fill: var(--accent); font: 700 13px "JetBrains Mono", monospace; }
.auto-widget .wcheck { fill: var(--live); font: 700 14px "JetBrains Mono", monospace; }
@keyframes wflow { to { stroke-dashoffset: -18; } }

/* ---------- design samples ---------- */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.sample-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform 0.18s var(--ease), border-color 0.2s;
}
.sample-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.sample-shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.sample-shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s var(--ease);
}
.sample-card:hover .sample-shot img { transform: scale(1.04); }
.sample-meta { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.sample-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sample-meta h3 { font-size: 1.35rem; }
.visit { font-size: 0.75rem; color: var(--accent); }
.sample-meta p { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 1rem; flex: 1; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: start;
}
.about-text h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 1.1rem; }
.about-text p { color: var(--muted); margin: 0 0 1rem; }
.spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.spec li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.spec li span { color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.spec li b { color: var(--text); text-align: right; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
}
.contact-pitch h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.contact-pitch p { color: var(--muted); margin: 0; max-width: 42ch; }
.contact-links { display: flex; flex-direction: column; gap: 0.8rem; }
.contact-card {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s, transform 0.15s var(--ease), background 0.2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateX(3px); background: var(--panel-2); }
.contact-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.contact-value { font-weight: 500; }
.contact-card .arrow { color: var(--accent); }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 2.2rem clamp(1.1rem, 4vw, 2rem);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer .brand-mark { color: var(--accent); }
.footer-sep { color: var(--faint); }
.footer .mono { font-size: 0.78rem; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .console { order: 2; }
  .work-list { grid-template-columns: 1fr; }
  .sample-grid { grid-template-columns: 1fr; max-width: 460px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .nav-links { gap: 1.05rem; }
  .nav-links a { font-size: 0.85rem; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .telemetry { font-size: 0.72rem; gap: 0.6rem; }
  .telemetry .sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   v2 — three disciplines, shared EN/SK, live instrument panels
   ============================================================ */

/* ---------- bilingual swap (shared across all pages) ---------- */
[data-lang="en"] .lang-sk { display: none !important; }
[data-lang="sk"] .lang-en { display: none !important; }

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: var(--bg-2);
}
.lang-switch button,
.lang-switch a {
  text-decoration: none;
  line-height: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.68rem;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover, .lang-switch a:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"],
.lang-switch a[aria-current="true"] { background: var(--accent); color: #1a1205; font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }

@media (max-width: 480px) {
  .nav { gap: 0.6rem; padding: 0.85rem 0.9rem; }
  .brand { gap: 0.45rem; }
  .brand-name { font-size: 0.9rem; }
  .nav-right { gap: 0.45rem; }
  .lang-switch button, .lang-switch a { padding: 0.3rem 0.5rem; }
  .nav-cta { font-size: 0.72rem; padding: 0.42rem 0.65rem; gap: 0.4rem; }
}
@media (max-width: 350px) {
  .nav-cta { gap: 0; padding: 0.42rem 0.55rem; }
  .nav-cta .lang-en, .nav-cta .lang-sk { display: none !important; }
}

/* ---------- work teasers (01 / 02 / 03) ---------- */
.work-teaser {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.work-teaser.flip .teaser-visual { order: -1; }

.teaser-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.65rem;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.teaser-outcome {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
}
.teaser-outcome::before { content: "→"; color: var(--accent); font-weight: 700; }
.teaser-desc { color: var(--muted); font-size: 0.97rem; margin: 0 0 1.2rem; max-width: 54ch; }
.teaser-copy .tags, .teaser-copy .platforms { margin-bottom: 1.5rem; }
.teaser-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* console-style instrument panel */
.teaser-panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: 0 30px 60px -34px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.teaser-panel-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.teaser-panel-head .brand-mark { font-size: 0.7rem; }
.teaser-panel-body { padding: 1.2rem clamp(0.9rem, 2vw, 1.5rem) 1.3rem; }
.teaser-panel-body svg { width: 100%; height: auto; display: block; }
.teaser-panel .auto-widget { margin: 0; padding: 0; border: 0; background: transparent; }

/* analyst panel — monthly bars rising */
.an-axis { stroke: var(--line-strong); stroke-width: 1.2; }
.an-bar { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 1.2; }
.an-bar.hot { fill: var(--accent-soft); stroke: var(--accent); }
.an-trend { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 5; }
.an-delta { fill: var(--live); font: 700 13px "JetBrains Mono", monospace; }
.an-cap { fill: var(--faint); font: 500 10.5px "JetBrains Mono", monospace; letter-spacing: 0.08em; }

/* os prime panel — module grid breathing */
.os-tile { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 1.2; }
.os-tile.hot { fill: var(--accent-soft); stroke: var(--accent); }
.os-lbl { fill: var(--muted); font: 500 10px "JetBrains Mono", monospace; letter-spacing: 0.04em; }
.os-lbl.hot { fill: var(--accent); font-weight: 700; }

/* ---------- console boot sequence + cursor ---------- */
.cursor { display: inline-block; color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .console-body .console-row { animation: bootrow 0.5s var(--ease) both; }
  .console-body .console-row:nth-child(1) { animation-delay: 0.1s; }
  .console-body .console-row:nth-child(2) { animation-delay: 0.22s; }
  .console-body .console-row:nth-child(3) { animation-delay: 0.34s; }
  .console-body .console-row:nth-child(4) { animation-delay: 0.46s; }
  .console-body .console-row:nth-child(5) { animation-delay: 0.58s; }
  .console-body .console-row:nth-child(6) { animation-delay: 0.7s; }
  .console-foot { animation: bootrow 0.5s var(--ease) both; animation-delay: 0.85s; }

  /* bars rise when the analyst panel scrolls in */
  .js .reveal .an-bar { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; }
  .js .reveal.is-in .an-bar { animation: rise 0.9s var(--ease) both; animation-delay: var(--d, 0s); }
  .an-trend { animation: wflow 1.2s linear infinite; }

  /* module tiles come online in sequence, then breathe */
  .os-tile { animation: tilebreathe 5s var(--ease) infinite; animation-delay: var(--d, 0s); }
}
@keyframes bootrow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes tilebreathe { 0%, 100% { opacity: 0.62; } 10% { opacity: 1; } }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- footer link ---------- */
.footer a { color: var(--muted); transition: color 0.2s; }
.footer a:hover { color: var(--accent); }

/* ---------- teaser responsive ---------- */
@media (max-width: 880px) {
  .work-teaser { grid-template-columns: 1fr; gap: 1.6rem; }
  /* show the animated panel above the copy so it never lands below the CTA */
  .work-teaser .teaser-visual { order: -1; }
}
