/* ==========================================================
   .Invoke(Method) — single-page site
   ========================================================== */

:root {
  --bg:           #08080c;
  --bg-elev:      #0f0f16;
  --surface:      #13131c;
  --surface-2:    #1a1a25;
  --border:       #22222e;
  --border-2:     #2e2e3d;

  --text:         #ecedf2;
  --text-dim:     #9a9aa8;
  --text-mute:    #676775;

  /* Syntax-highlight palette — drives the brand */
  --syn-punct:    #6b6b7a;   /* dots, parens */
  --syn-method:   #7aa7ff;   /* Invoke */
  --syn-param:    #a6e3a1;   /* Method / param */
  --syn-keyword:  #c792ea;   /* accent 2 */

  --accent:       #9b6dff;
  --accent-2:     #61afef;
  --accent-glow:  rgba(155, 109, 255, 0.35);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-card: 0 1px 0 0 rgba(255,255,255,0.02) inset,
                 0 20px 40px -20px rgba(0,0,0,0.6);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1160px;
}

/* ---------- Reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }

::selection { background: var(--accent-glow); color: #fff; }

/* ---------- Background ambience ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 35%, transparent 80%);
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  top: -25vmax; left: 50%;
  width: 90vmax; height: 90vmax;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(155,109,255,0.18), transparent 70%),
    radial-gradient(closest-side at 65% 55%, rgba(97,175,239,0.12), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.section {
  padding: clamp(72px, 10vw, 140px) 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-lede {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 17px;
  max-width: 52ch;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}
@media (min-width: 880px) {
  .grid-2 { grid-template-columns: 0.9fr 1.1fr; }
}

/* ---------- Syntax-highlight brand mark ---------- */
.syn-punct   { color: var(--syn-punct); }
.syn-method  { color: var(--syn-method); }
.syn-param   { color: var(--syn-param); }
.syn-keyword { color: var(--syn-keyword); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(8, 8, 12, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(8, 8, 12, 0.85);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-links {
  display: none;
  gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav-links a {
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover::after { transform: scaleX(1); }
@media (min-width: 720px) {
  .nav-links { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(72px, 12vw, 160px) 0 clamp(48px, 8vw, 100px);
  position: relative;
}
.hero-inner {
  max-width: 900px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

.hero-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(32px, 6.2vw, 76px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 28px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.caret {
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  margin-left: 0.15em;
  background: var(--accent);
  animation: blink 1.1s steps(2, start) infinite;
  border-radius: 2px;
}
@keyframes blink {
  to { visibility: hidden; }
}

.hero-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.hero-sub {
  color: var(--text-dim);
  font-size: clamp(16px, 1.5vw, 18.5px);
  max-width: 62ch;
  margin-bottom: 40px;
}
.hero-sub strong {
  color: var(--text);
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.2s ease;
  cursor: pointer;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(180deg, #a57dff 0%, #8358e6 100%);
  color: #0a0a0f;
  box-shadow: 0 6px 24px -6px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -6px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.1) inset;
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.btn-lg {
  padding: 16px 30px;
  font-size: 16px;
  font-family: var(--font-mono);
  letter-spacing: 0;
}

/* ---------- Hero stats ---------- */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 640px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
.stat {
  background: var(--surface);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.stat-plus {
  color: var(--accent);
}
.stat-label {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.01em;
}

/* ---------- About ---------- */
.about-body p + p { margin-top: 16px; }
.about-body p {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.7;
}

/* ---------- Expertise cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-wide { grid-column: span 2; }
}

.card {
  position: relative;
  padding: 26px 26px 28px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(155,109,255,0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.card:hover::before { opacity: 1; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.card-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}
.card-icon {
  width: 26px; height: 26px;
  color: var(--accent-2);
  opacity: 0.9;
}
.card-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}
.card-desc {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.card-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ---------- Selected work ---------- */
.works {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.work {
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.work:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.work-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.work-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.12em;
}
.work-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(155, 109, 255, 0.08);
  letter-spacing: 0.02em;
}

.work-title {
  font-size: clamp(19px, 2.1vw, 23px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.work-body {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.65;
}

/* ---------- Principles ---------- */
.principles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 680px)  { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .principles { grid-template-columns: repeat(3, 1fr); } }

.principle {
  padding: 22px 22px 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
}
.principle:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.principle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.principle-file {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--syn-param);
  letter-spacing: 0;
}
.principle-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}

.principle-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.principle-lede {
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
  letter-spacing: -0.005em;
}

.principle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.principle-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
}
.principle-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.principle code,
.principle-list code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 1px 6px;
  background: rgba(155, 109, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--syn-method);
}

/* ---------- Qualities ---------- */
.qualities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) { .qualities { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .qualities { grid-template-columns: repeat(3, 1fr); } }

.quality {
  padding: 22px 22px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.quality:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.quality-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.quality-mark {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}
.quality-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.quality p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Summary callout under qualities */
.summary-callout {
  margin-top: 36px;
  padding: clamp(24px, 3vw, 36px);
  background:
    linear-gradient(180deg, rgba(155,109,255,0.06), rgba(97,175,239,0.03)),
    var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  position: relative;
}
.summary-callout::before {
  content: '"';
  position: absolute;
  top: -10px; left: 20px;
  font-family: 'Georgia', serif;
  font-size: 72px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.25;
}
.summary-callout p {
  color: var(--text);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ---------- Industries ---------- */
.industries {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) { .industries { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .industries { grid-template-columns: repeat(3, 1fr); } }

.industry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.industry:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.industry-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: inline-block;
}
.industry h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.industry p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ---------- Clients ---------- */
.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.client {
  position: relative;
  padding: 28px 20px 24px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  min-height: 118px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  overflow: hidden;
}
.client::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(300px circle at 50% 0%, rgba(155,109,255,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.client:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.client:hover::before {
  opacity: 1;
}
.client-name {
  position: relative;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.client-cat {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.section-contact {
  text-align: center;
  padding-bottom: clamp(90px, 14vw, 180px);
}
.contact-title {
  font-family: var(--font-mono);
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 18px 0 18px;
}
.contact-sub {
  color: var(--text-dim);
  font-size: clamp(16px, 1.6vw, 18px);
  max-width: 44ch;
  margin: 0 auto 36px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
}
@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: auto 1fr auto auto;
    gap: 20px;
  }
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
}
.footer-currently {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-mute);
  letter-spacing: 0.01em;
}
.footer-links {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-links a {
  color: var(--text-mute);
  display: inline-flex;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}
.footer-links a:hover {
  color: var(--text);
  background: var(--surface);
}
.footer-meta {
  color: var(--text-mute);
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ---------- Build toast ---------- */
.build-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(15, 15, 22, 0.92);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  pointer-events: none;
  z-index: 100;
}
.build-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.build-toast-check {
  color: #4ade80;
  font-weight: 700;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
