/* ============================================================
   Praneeth V P — freelance AI portfolio
   Theme: deep teal-black field / warm cream type / chai-orange
   Type:  Instrument Serif (display) + Spline Sans Mono (everything else)
   Craft: layered inset-highlight shadows, concentric radii,
          animated agent-demo covers, one orange band, one cream interlude
   ============================================================ */

:root {
  --bg: #0C1315;
  --bg-raised: #101A1D;
  --surface: #131F22;
  --surface-2: #182629;
  --well: #0A1012;

  --ink: #F2EDDF;
  --muted: #9CB0A9;
  --faint: #66807A;

  --line: rgba(238, 231, 214, 0.09);
  --line-strong: rgba(238, 231, 214, 0.17);

  --accent: #F26A3C;
  --accent-bright: #F58A63;
  --accent-ink: #24100A;
  --accent-soft: rgba(242, 106, 60, 0.14);

  --teal: #46C8BF;
  --teal-soft: rgba(70, 200, 191, 0.13);
  --red: #EF5A57;

  --cream: #F5EFE2;
  --cream-ink: #16292B;
  --cream-muted: #4E625D;
  --cream-line: #E0D6C2;

  /* the bird sprite's eye reads as a punch-out of the page field */
  --paper: var(--bg);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;

  /* layered gloss: triple inset top-light + triple stacked drop */
  --shadow-gloss:
    inset 0 0.6px 1.1px -0.9px rgba(255, 255, 255, 0.40),
    inset 0 2.3px 4.1px -1.8px rgba(255, 255, 255, 0.32),
    inset 0 10px 18px -2.75px rgba(255, 255, 255, 0.18),
    0 0.7px 0.7px -1.25px rgba(0, 0, 0, 0.32),
    0 2.7px 2.7px -2.5px rgba(0, 0, 0, 0.28),
    0 12px 12px -3.75px rgba(0, 0, 0, 0.24);
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.30),
    0 12px 32px -8px rgba(0, 0, 0, 0.45);
  --shadow-card-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 24px 48px -12px rgba(0, 0, 0, 0.55);

  --ease-default: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.2);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 60ch;
}

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

html { scroll-behavior: smooth; overflow-x: clip; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* Paper grain — keeps the dark field from feeling like flat pixels. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0.30 0.30 0.30 0 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
h1 { font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.015em; }

h1 em, h2 em, blockquote em {
  font-style: italic;
  color: var(--accent-bright);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- atoms ---------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms var(--ease-spring), box-shadow 250ms var(--ease-default),
              background-color 200ms var(--ease-default), color 200ms var(--ease-default),
              border-color 200ms var(--ease-default);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 100ms; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-gloss);
}
.btn-primary:hover {
  background: #F5754A;
  box-shadow: var(--shadow-gloss), 0 10px 28px -6px rgba(242, 106, 60, 0.45);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}
.btn-ghost--night { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost--night:hover { border-color: var(--ink); background: var(--surface); }

.btn-lg { font-size: 0.95rem; padding: 1rem 1.9rem; }

.chip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.chip--building   { background: var(--accent-soft); color: var(--accent-bright); }
.chip--production { background: var(--accent-soft); color: var(--accent-bright); }
.chip--shipped    { background: var(--teal-soft); color: var(--teal); }
.chip--running    { background: rgba(238, 231, 214, 0.10); color: #D9D0BA; }
.chip--experiment { background: rgba(238, 231, 214, 0.06); color: var(--muted); }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1.15rem;
}
.tags li {
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.14rem 0.62rem;
  white-space: nowrap;
}
.tags--night li { border-color: var(--line); color: var(--muted); }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms var(--ease-out), transform 650ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem var(--gutter);
  background: rgba(12, 19, 21, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav-bird { width: 24px; height: 24px; color: var(--accent); }

.nav-links { display: flex; gap: 1.7rem; }
.nav-links a {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--muted);
  transition: color 160ms var(--ease-default);
}
.nav-links a:hover { color: var(--ink); }

@media (max-width: 700px) {
  .nav-links { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) clamp(4.5rem, 9vw, 7rem);
  max-width: 1200px;
  margin: 0 auto;
}

/* glows read like stage lighting on the dark field */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  top: -24%;
  left: -14%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(70, 200, 191, 0.10), transparent 72%);
}
.hero::after {
  top: 0;
  right: -18%;
  width: 58%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(242, 106, 60, 0.12), transparent 72%);
}

.hero-drift {
  position: absolute;
  z-index: -1;
  width: 26px;
  height: 13px;
  color: var(--ink);
  opacity: 0.2;
  animation: drift 6s ease-in-out infinite;
}
.hero-drift--1 { top: 16%; left: 46%; }
.hero-drift--2 { top: 9%; left: 58%; width: 18px; animation-delay: 1.6s; animation-duration: 7.5s; }
.hero-drift--3 { top: 24%; left: 66%; width: 14px; animation-delay: 3.1s; animation-duration: 8.5s; opacity: 0.12; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -8px); }
}
@media (max-width: 860px) {
  .hero-drift { display: none; }
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  background: rgba(238, 231, 214, 0.04);
  border-radius: 999px;
  padding: 0.32rem 0.95rem;
  margin-bottom: 1.7rem;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 106, 60, 0.5); }
  50% { box-shadow: 0 0 0 7px rgba(242, 106, 60, 0); }
}

.hero-sub {
  max-width: var(--measure);
  color: var(--muted);
  margin-top: 1.7rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.hero-photo {
  position: relative;
  justify-self: end;
}
.hero-photo img {
  display: block;
  width: min(300px, 100%);
  height: auto;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  box-shadow:
    0 0 0 6px rgba(238, 231, 214, 0.03),
    0 24px 70px -18px rgba(242, 106, 60, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 350ms var(--ease-spring);
}
.hero-photo:hover img { transform: scale(1.025); }

.photo-bird {
  position: absolute;
  top: -14px;
  right: 40px;
  width: 34px;
  height: 34px;
  color: var(--ink);
  transform: scaleX(-1);
  animation: perch 4.5s ease-in-out infinite;
}
@keyframes perch {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-5px); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; margin-top: 1rem; }
}

/* ---------- marquee: the one loud band ---------- */

.marquee {
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.8rem 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  width: max-content;
  animation: marquee 30s linear infinite;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-bird { width: 22px; height: 11px; color: var(--accent-ink); opacity: 0.75; flex-shrink: 0; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(5rem, 10vw, 8.5rem) var(--gutter);
  max-width: 1200px;
  margin: 0 auto;
}

.section--night {
  position: relative;
  overflow: hidden;
  max-width: none;
  background: var(--bg-raised);
  border-block: 1px solid var(--line);
}
.section--night::before {
  content: '';
  position: absolute;
  top: -25%;
  left: -10%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70, 200, 191, 0.06), transparent 72%);
  pointer-events: none;
}
.section--night .shell {
  position: relative;
  max-width: 1200px;
  margin-inline: auto;
}

/* the cream interlude */
.section--alt {
  max-width: none;
  background: var(--cream);
  color: var(--cream-ink);
}

.section-lead {
  max-width: var(--measure);
  color: var(--muted);
  margin-top: 1.3rem;
}
.section-lead--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.2rem;
  margin-top: 3.2rem;
}

.work-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.5rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-default),
              border-color 280ms var(--ease-default);
}
.work-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}
.work-card--wide { grid-column: span 4; }

.work-meta { margin: 1.1rem 0 0.85rem; }
.work-card h3 { margin-bottom: 0.6rem; }
.work-card p { font-size: 0.85rem; color: var(--muted); }
.work-card strong { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card, .work-card--wide { grid-column: span 1; }
  .work-card--wide { grid-column: span 2; }
}
@media (max-width: 620px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .work-card--wide { grid-column: span 1; }
}

/* ---------- demo covers (the wow layer) ---------- */

.work-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 172px;
  margin-inline: -1rem;
  padding: 0.9rem 1rem;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  font-size: 0.7rem;
  line-height: 1.5;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
}
.work-card--wide .work-cover { height: 208px; }

.cover-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.65rem;
}
.cover-foot {
  margin-top: auto;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.cover-foot em { font-style: normal; color: var(--red); }

/* -- shared chat bubbles -- */
.bubble {
  max-width: 82%;
  padding: 0.42rem 0.7rem;
  border-radius: 12px;
  font-size: 0.7rem;
  line-height: 1.45;
  margin-bottom: 0.45rem;
}
.b-user {
  align-self: flex-end;
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-bottom-right-radius: 3px;
}
.b-bot {
  align-self: flex-start;
  margin-right: auto;
  background: rgba(238, 231, 214, 0.08);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}

/* -- 1 · OpenClaw chat -- */
.cover-chat { justify-content: flex-start; height: auto; min-height: 208px; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.7rem;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(70, 200, 191, 0.8);
}
.cb1 { animation: cb1 11s var(--ease-out) infinite; }
.cb2 { animation: cb2 11s var(--ease-out) infinite; }
.cb3 { animation: cb3 11s var(--ease-out) infinite; }
.cb4 { animation: cb4 11s var(--ease-out) infinite; }
@keyframes cb1 { 0%, 2% { opacity: 0; transform: translateY(8px); } 7%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes cb2 { 0%, 15% { opacity: 0; transform: translateY(8px); } 20%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes cb3 { 0%, 40% { opacity: 0; transform: translateY(8px); } 45%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes cb4 { 0%, 56% { opacity: 0; transform: translateY(8px); } 61%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }

.typing { display: inline-flex; gap: 4px; padding: 0.55rem 0.75rem; }
.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* -- 2 · Closed Loop trace -- */
.trace { display: flex; flex-direction: column; gap: 7px; }
.tspan {
  height: 11px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teal), rgba(70, 200, 191, 0.45));
  transform-origin: left center;
}
.t1 { width: 84%; animation: tg1 9s var(--ease-out) infinite; }
.t2 { width: 60%; margin-left: 8%; animation: tg2 9s var(--ease-out) infinite; }
.t3 { width: 36%; margin-left: 16%; animation: tg3 9s var(--ease-out) infinite; }
.t4 { width: 22%; margin-left: 16%; animation: tg4 9s var(--ease-out) infinite; }
.t5 { width: 48%; margin-left: 24%; animation: tg5 9s var(--ease-out) infinite; }
.terr { background: linear-gradient(90deg, var(--red), rgba(239, 90, 87, 0.5)); }
@keyframes tg1 { 0%, 4%  { opacity: 0; transform: scaleX(0); } 12%, 91% { opacity: 1; transform: scaleX(1); } 97%, 100% { opacity: 0; transform: scaleX(1); } }
@keyframes tg2 { 0%, 12% { opacity: 0; transform: scaleX(0); } 20%, 91% { opacity: 1; transform: scaleX(1); } 97%, 100% { opacity: 0; transform: scaleX(1); } }
@keyframes tg3 { 0%, 20% { opacity: 0; transform: scaleX(0); } 28%, 91% { opacity: 1; transform: scaleX(1); } 97%, 100% { opacity: 0; transform: scaleX(1); } }
@keyframes tg4 { 0%, 28% { opacity: 0; transform: scaleX(0); } 36%, 91% { opacity: 1; transform: scaleX(1); } 97%, 100% { opacity: 0; transform: scaleX(1); } }
@keyframes tg5 { 0%, 36% { opacity: 0; transform: scaleX(0); } 44%, 91% { opacity: 1; transform: scaleX(1); } 97%, 100% { opacity: 0; transform: scaleX(1); } }

/* -- 3 · RAG document -- */
.cover-rag { justify-content: center; gap: 0.9rem; }
.rag-doc {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 231, 214, 0.03);
}
.doc-line { height: 6px; border-radius: 3px; background: rgba(238, 231, 214, 0.14); }
.d1 { width: 88%; }
.d2 { width: 72%; }
.d3 { width: 80%; }
.d4 { width: 46%; }
.dhl {
  position: relative;
  overflow: hidden;
}
.dhl::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--teal);
  opacity: 0.85;
  transform: scaleX(0);
  transform-origin: left center;
  animation: hl 9s var(--ease-out) infinite;
}
@keyframes hl { 0%, 30% { transform: scaleX(0); } 42%, 91% { transform: scaleX(1); } 97%, 100% { transform: scaleX(1); opacity: 0; } }
.rag-answer {
  font-size: 0.7rem;
  color: var(--ink);
  animation: fade-up 9s var(--ease-out) infinite;
}
.cite {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.62rem;
}
@keyframes fade-up { 0%, 48% { opacity: 0; transform: translateY(6px); } 58%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

/* -- 4 · alert stream -- */
.cover-alerts { justify-content: center; gap: 0.5rem; }
.alert-row {
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: rgba(238, 231, 214, 0.04);
  border: 1px solid var(--line);
}
.alert-row b { font-weight: 600; color: #D9B461; margin-right: 0.2rem; }
.alert-row.crit b { color: var(--red); }
.ar1 { animation: arr1 9s var(--ease-out) infinite; }
.ar2 { animation: arr2 9s var(--ease-out) infinite; }
.ar3 { animation: arr3 9s var(--ease-out) infinite; }
@keyframes arr1 { 0%, 4%  { opacity: 0; transform: translateX(-10px); } 10%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes arr2 { 0%, 14% { opacity: 0; transform: translateX(-10px); } 20%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes arr3 { 0%, 24% { opacity: 0; transform: translateX(-10px); } 30%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
.alert-verdict {
  font-size: 0.68rem;
  color: var(--accent-bright);
  padding-left: 0.55rem;
  border-left: 2px solid var(--accent);
  animation: verdict 9s var(--ease-out) infinite;
}
@keyframes verdict { 0%, 48% { opacity: 0; transform: translateY(6px); } 58%, 91% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

/* -- 5 · NL→SQL terminal -- */
.cover-sql { justify-content: flex-start; }
.term-q { color: var(--ink); font-size: 0.72rem; margin-bottom: 0.45rem; }
.type-line {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  max-width: 100%;
  border-right: 6px solid var(--accent);
  animation: typing 10s steps(30, end) infinite;
}
@keyframes typing {
  0%, 3% { width: 0; }
  28%, 96% { width: 100%; }
  100% { width: 100%; }
}
.term-sql {
  font-size: 0.66rem;
  color: var(--teal);
  opacity: 0.9;
  animation: sqlin 10s var(--ease-out) infinite;
}
@keyframes sqlin { 0%, 32% { opacity: 0; transform: translateY(5px); } 40%, 92% { opacity: 0.9; transform: none; } 98%, 100% { opacity: 0; } }
.term-bars {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 52px;
  margin-top: auto;
}
.term-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(242, 106, 60, 0.35));
  transform-origin: bottom center;
  animation: barup 10s var(--ease-out) infinite;
}
.term-bars i:nth-child(2) { animation-delay: 0.08s; }
.term-bars i:nth-child(3) { animation-delay: 0.16s; }
.term-bars i:nth-child(4) { animation-delay: 0.24s; }
.term-bars i:nth-child(5) { animation-delay: 0.32s; }
.term-bars i:nth-child(6) { animation-delay: 0.40s; }
@keyframes barup { 0%, 45% { transform: scaleY(0); } 56%, 92% { transform: scaleY(1); } 98%, 100% { transform: scaleY(0); } }

/* -- 6 · inference pipeline -- */
.cover-stack { justify-content: flex-start; }
.stack-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-block: auto;
}
.stack-node {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.64rem;
  color: var(--ink);
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.n-gpu { color: var(--teal); border-color: rgba(70, 200, 191, 0.35); }
.gpu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse-teal 1.8s ease-in-out infinite;
}
@keyframes pulse-teal {
  0%, 100% { box-shadow: 0 0 0 0 rgba(70, 200, 191, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(70, 200, 191, 0); }
}
.stack-flow {
  position: relative;
  flex: 1;
  height: 2px;
  min-width: 26px;
  background: var(--line);
  border-radius: 1px;
}
.pkt {
  position: absolute;
  top: -2.5px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(242, 106, 60, 0.7);
  animation: pkt 2.4s linear infinite;
}
.pk2 { animation-delay: 0.8s; }
.pk3 { animation-delay: 1.6s; }
@keyframes pkt {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 7px); opacity: 0; }
}

/* -- 7 · research fan-out -- */
.cover-fan { justify-content: flex-start; }
.cover-fan svg { width: 100%; height: auto; max-height: 108px; margin-block: auto; display: block; }
.wire {
  fill: none;
  stroke: rgba(238, 231, 214, 0.30);
  stroke-width: 1.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.wr1 { animation: wire 10s var(--ease-default) infinite; }
.wr2 { animation: wire 10s var(--ease-default) infinite; animation-delay: 0.15s; }
.wr3 { animation: wire 10s var(--ease-default) infinite; animation-delay: 0.3s; }
.wr4 { animation: wire2 10s var(--ease-default) infinite; }
.wr5 { animation: wire2 10s var(--ease-default) infinite; animation-delay: 0.15s; }
.wr6 { animation: wire2 10s var(--ease-default) infinite; animation-delay: 0.3s; }
@keyframes wire  { 0%, 6%  { stroke-dashoffset: 1; } 26%, 94% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes wire2 { 0%, 38% { stroke-dashoffset: 1; } 58%, 94% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
.fnode { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.4; }
.froot { fill: var(--accent); stroke: none; }
.fagent { animation: agent-glow 10s ease-in-out infinite; }
.fa2 { animation-delay: 0.2s; }
.fa3 { animation-delay: 0.4s; }
@keyframes agent-glow {
  0%, 24% { fill: var(--surface-2); }
  32%, 90% { fill: var(--teal); stroke: none; }
  100% { fill: var(--surface-2); }
}
.fbrief {
  fill: var(--accent);
  animation: brief-pop 10s var(--ease-spring) infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes brief-pop { 0%, 60% { transform: scale(0); } 68%, 94% { transform: scale(1); } 100% { transform: scale(0); } }

/* -- 8 · offline Q&A -- */
.cover-offline { justify-content: center; gap: 0.45rem; }
.net-chip {
  align-self: flex-start;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(239, 90, 87, 0.12);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.5rem;
}
.net-chip s { opacity: 0.65; }
.ob1 { animation: cb1 9s var(--ease-out) infinite; }
.ob2 { animation: cb3 9s var(--ease-out) infinite; }

/* ---------- services ---------- */

.service-list {
  list-style: none;
  margin-top: 3.2rem;
  border-top: 1px solid var(--line);
}

.service {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.5rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
  transition: background-color 250ms var(--ease-default);
}

.service-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
}

.service-body h3 { margin-bottom: 0.7rem; font-size: 1.65rem; }
.service-body p { max-width: var(--measure); font-size: 0.88rem; color: var(--muted); }
.service-body .tags { padding-top: 1.05rem; }

.service-note {
  margin-top: 1.9rem;
  font-size: 0.76rem;
  color: var(--faint);
  letter-spacing: 0.01em;
}

@media (max-width: 620px) {
  .service { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ---------- pulled quote ---------- */

.quote-break {
  position: relative;
  padding: clamp(4.5rem, 9vw, 7rem) var(--gutter);
  text-align: center;
}
.quote-break::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(760px, 92%);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70, 200, 191, 0.08), transparent 75%);
  pointer-events: none;
}
.quote-break blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  letter-spacing: -0.02em;
  line-height: 1.22;
  max-width: 26em;
  margin: 0 auto;
}
.quote-bird {
  width: 30px;
  height: 15px;
  color: var(--accent);
  margin-bottom: 1.5rem;
  animation: drift 7s ease-in-out infinite;
}

/* ---------- notes ---------- */

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 3.2rem;
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-raised) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 280ms var(--ease-spring), box-shadow 280ms var(--ease-default),
              border-color 280ms var(--ease-default);
}
.note-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(70, 200, 191, 0.4);
}
.note-card:active { transform: translateY(-2px) scale(0.99); }

.note-kind {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}
.note-card p { font-size: 0.83rem; color: var(--muted); }
.note-go {
  margin-top: auto;
  padding-top: 0.9rem;
  font-size: 0.78rem;
  color: var(--accent-bright);
}

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

/* ---------- about (cream interlude) ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.about-photo img {
  display: block;
  width: min(280px, 100%);
  border-radius: 50%;
  border: 1px solid var(--cream-line);
  background: #fff;
  box-shadow: 0 18px 50px -12px rgba(22, 41, 43, 0.35);
  height: auto;
}

.section--alt .eyebrow { color: #0E7C74; }
.about-body { margin-top: 1.5rem; display: grid; gap: 1.15rem; }
.about-body p { max-width: var(--measure); color: var(--cream-muted); font-size: 0.9rem; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { justify-self: start; }
}

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(900px, 110%);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 106, 60, 0.10), transparent 75%);
  pointer-events: none;
}
.cta h2 { max-width: 18em; margin: 0 auto; }
.cta .section-lead { margin-top: 1.5rem; }
.cta-bird {
  width: 42px;
  height: 42px;
  color: var(--accent);
  margin-bottom: 1.7rem;
  animation: perch 5s ease-in-out infinite;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.6rem;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem var(--gutter) 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-id p {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 32ch;
}

.footer-links, .footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links a, .footer-social a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms var(--ease-default);
  align-self: flex-start;
}
.footer-links a:hover, .footer-social a:hover { color: var(--accent-bright); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  font-size: 0.74rem;
  color: var(--faint);
}
.footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-bright); }
.footer-clock { font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* ---------- reduced motion: static, fully-visible mocks ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-drift, .photo-bird, .quote-bird, .cta-bird, .status-dot,
  .marquee-track, .hero-photo img,
  .cb1, .cb2, .cb3, .cb4, .ob1, .ob2, .typing span,
  .tspan, .dhl::after, .rag-answer, .alert-row, .alert-verdict,
  .type-line, .term-sql, .term-bars i, .pkt, .gpu-dot,
  .wire, .fagent, .fbrief {
    animation: none !important;
  }
  .dhl::after { transform: scaleX(1); }
  .type-line { width: 100%; border-right: none; }
  .fbrief { transform: scale(1); }
  .wire { stroke-dashoffset: 0; }
  .fagent { fill: var(--teal); }
}
