:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --bg-soft: #11161b;
  --panel: #151a20;
  --panel-strong: #1b232b;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f2ec;
  --muted: #aeb4b8;
  --quiet: #727d85;
  --accent: #d7ff68;
  --accent-2: #66d9ef;
  --danger: #ff6b5f;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(215, 255, 104, 0.06), transparent 34%),
    radial-gradient(circle at 82% 22%, rgba(102, 217, 239, 0.09), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img,
svg,
canvas {
  max-width: 100%;
}

button,
a,
[role="button"],
[role="link"] {
  touch-action: manipulation;
}

section[id] {
  scroll-margin-top: 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.brand,
.nav-links,
.icon-links {
  display: flex;
  align-items: center;
}

.nav-drawer {
  display: contents;
}

.nav-toggle {
  display: none;
}

.brand {
  gap: 13px;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  position: relative;
  display: flex;
  width: 52px;
  height: 38px;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 2px;
  padding: 0 0 7px 7px;
  border: 1px solid var(--accent-2);
  background: var(--panel-strong);
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, 0.04),
    inset 2px 0 0 var(--accent),
    3px 3px 0 rgba(102, 217, 239, 0.22);
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.brand-mark::before {
  position: absolute;
  top: 3px;
  left: 7px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    6px 0 0 var(--accent-2),
    12px 0 0 var(--danger);
  content: "";
}

.brand-prompt {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.brand-cursor {
  width: 8px;
  height: 2px;
  background: var(--accent-2);
  animation: terminal-blink 1.2s steps(1, end) infinite;
}

.brand:hover .brand-mark {
  border-color: var(--accent);
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, 0.06),
    inset 3px 0 0 var(--accent),
    4px 4px 0 rgba(215, 255, 104, 0.24);
}

@keyframes terminal-blink {
  0%,
  48% {
    opacity: 1;
  }

  49%,
  100% {
    opacity: 0.2;
  }
}

.brand-name {
  display: flex;
  height: 38px;
  align-items: center;
  line-height: 1;
}

.brand-name strong {
  font-family: Inter, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name strong span {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: 600;
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.icon-links {
  gap: 8px;
}

.icon-links a {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.icon-links a:hover {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.icon-links svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.icon-email svg {
  width: 21px;
  height: 21px;
  fill: none;
}

.icon-email svg path {
  stroke: none;
}

.icon-linkedin svg {
  width: 19px;
  height: 19px;
}

.icon-x svg {
  width: 17px;
  height: 17px;
}

.icon-substack svg {
  width: 18px;
  height: 20px;
}

.icon-linkedin {
  color: #0a66c2;
}

.icon-x {
  color: #f5f5f5;
}

.icon-substack {
  color: #ff6719;
}

.hero-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 136px);
  padding: 56px 0 48px;
}

.hero-block > *,
.section-heading > *,
.performance-grid > *,
.cv-layout > * {
  min-width: 0;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.panel-header {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 5.1vw, 66px);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 750;
}

.hero-summary {
  max-width: 660px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #11150f;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button-ghost {
  color: var(--muted);
}

.thesis-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

.thesis-panel::before {
  position: absolute;
  inset: 0;
  border-top: 3px solid var(--accent);
  content: "";
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(215, 255, 104, 0.8);
}

.thesis-panel h2 {
  margin: 22px 0 12px;
  font-size: clamp(24px, 2.2vw, 31px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

.thesis-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.thesis-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.thesis-form label {
  display: grid;
  gap: 8px;
}

.thesis-form span {
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.thesis-form input,
.thesis-form select,
.thesis-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
  padding: 0 13px;
}

.thesis-form .form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}

.thesis-form input {
  min-height: 46px;
}

.thesis-form select {
  min-height: 46px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 19px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 19px / 6px 6px no-repeat,
    rgba(0, 0, 0, 0.22);
  cursor: pointer;
  padding-right: 38px;
}

.thesis-form select option {
  background: #151a20;
  color: var(--text);
}

.thesis-form textarea {
  min-height: 88px;
  padding-top: 12px;
  resize: vertical;
}

.thesis-form input:focus,
.thesis-form select:focus,
.thesis-form textarea:focus {
  border-color: var(--accent);
}

.thesis-form button {
  min-height: 48px;
  border: 0;
  background: var(--text);
  color: #0b0d10;
  cursor: pointer;
  font-weight: 800;
}

.thesis-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.thesis-panel .form-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.thesis-panel .form-status[data-state="success"] {
  color: var(--accent);
}

.thesis-panel .form-status[data-state="error"] {
  color: #ff9b8f;
}

.notes-block {
  border-top: 1px solid var(--line);
  padding: 58px 0 52px;
}

.section-kicker {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(280px, 0.52fr);
  gap: 40px;
  align-items: start;
  margin-top: 14px;
}

.section-heading h2 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.section-description {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  margin-top: 28px;
  padding: 18px;
}

.section-description span {
  display: block;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-description p {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.notes-block .section-heading,
.markets-block .section-heading {
  grid-template-columns: 1fr;
}

.notes-block .section-heading h2,
.markets-block .section-heading h2,
.signalgraph-block .section-heading h2 {
  max-width: none;
  font-size: clamp(26px, 2.8vw, 36px);
  white-space: nowrap;
}

.note-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 34px;
}

.note-tab {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.note-tab span {
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
}

.note-tab.is-active {
  border-color: var(--accent);
  background: rgba(215, 255, 104, 0.1);
  color: var(--text);
}

.note-tab:disabled {
  cursor: not-allowed;
}

.note-tab.is-locked {
  opacity: 0.52;
}

.note-tab.is-locked:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.lock-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.note-context {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 14px;
  padding: 10px 0;
}

.note-context p {
  margin: 0;
}

.note-context-title {
  color: var(--text);
  font-weight: 800;
  line-height: 1.55;
}

.note-context-copy {
  color: var(--muted);
  line-height: 1.55;
}

.note-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.work-card {
  display: flex;
  height: 100%;
  min-height: 260px;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 17px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    opacity 180ms ease;
}

.work-card.is-hidden {
  display: none;
}

.work-card:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.work-card.is-clickable {
  cursor: pointer;
}

.work-card.is-clickable:focus-visible {
  border-color: var(--accent);
  outline: 0;
}

.work-card-top {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.work-card h3 {
  margin: 26px 0 7px;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: 0;
}

.work-sector {
  margin: 0;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.work-card dl {
  display: grid;
  flex: 1;
  grid-template-rows: repeat(2, minmax(min-content, 1fr));
  gap: 11px;
  margin: 22px 0 0;
}

.work-card dl > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.work-card dt {
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.work-card dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.work-card a,
.work-link {
  width: fit-content;
  margin-top: auto;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding-top: 18px;
  padding-bottom: 3px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.work-link:disabled {
  color: var(--quiet);
  cursor: not-allowed;
}

.selected-note {
  display: none;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(215, 255, 104, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.03);
  margin-top: 16px;
  padding: 24px;
}

.selected-note.has-selection {
  display: block;
  border-color: var(--line-strong);
}

.selected-note-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.selected-note-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.selected-note-close:hover,
.selected-note-close:focus-visible {
  border-color: var(--accent);
  background: rgba(215, 255, 104, 0.08);
  color: var(--accent);
}

.selected-note-close svg,
.selected-note-collapse svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.selected-note-meta {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
}

.selected-note h3 {
  margin: 14px 0 0;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: 0;
}

.selected-note > p {
  max-width: 840px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.selected-note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.selected-note-grid div {
  border: 1px solid var(--line);
  padding: 14px;
}

.selected-note-grid span {
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.selected-note-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.selected-note-full {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}

.selected-note-full span {
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.selected-note-full > div {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.selected-note-collapse {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  margin: 28px 0 0 auto;
  color: var(--text);
  cursor: pointer;
  padding: 0 15px;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.selected-note-collapse:hover,
.selected-note-collapse:focus-visible {
  border-color: var(--accent);
  background: rgba(215, 255, 104, 0.08);
  color: var(--accent);
}

.full-note-body {
  display: grid;
  gap: 20px;
}

.full-note-body section {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.full-note-body section:first-child {
  border-top: 0;
  padding-top: 0;
}

.full-note-body h4 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.full-note-body p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.full-note-body ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.full-note-body strong {
  color: var(--text);
  font-weight: 700;
}

.full-note-body,
.section-description,
.note-context-copy,
.work-card dd,
.cv-timeline p {
  overflow-wrap: anywhere;
}

.work-card-muted {
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 9px
    ),
    rgba(255, 255, 255, 0.02);
}

.markets-block {
  border-top: 1px solid var(--line);
  padding: 58px 0 52px;
}

.performance-shell {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  margin-top: 10px;
  padding: 24px;
}

.performance-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.performance-date,
.performance-stats span,
.performance-legend,
.performance-note {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0;
}

.performance-toolbar h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

.performance-date {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.performance-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.performance-stats div {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  padding: 14px;
}

.performance-stats span {
  display: block;
  color: var(--quiet);
  font-size: 10px;
  text-transform: uppercase;
}

.performance-stats strong {
  display: block;
  color: var(--text);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1;
}

.performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.performance-chart-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.chart-wrap {
  position: relative;
  overflow: hidden;
  flex: 1;
  border: 1px solid var(--line);
  margin-top: 0;
  padding: 8px 0 0;
}

#performance-chart {
  display: block;
  width: 100%;
  height: 330px;
  touch-action: pan-y;
}

.chart-tooltip {
  position: absolute;
  z-index: 2;
  width: 172px;
  border: 1px solid var(--line-strong);
  background: rgba(11, 13, 16, 0.94);
  box-shadow: var(--shadow);
  color: var(--muted);
  padding: 10px;
  pointer-events: none;
}

.chart-tooltip strong,
.chart-tooltip span {
  display: block;
}

.chart-tooltip strong {
  color: var(--text);
  font-size: 12px;
}

.chart-tooltip span {
  margin-top: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.performance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.performance-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.performance-legend i {
  display: block;
  width: 20px;
  height: 3px;
}

.legend-portfolio {
  background: var(--accent);
}

.legend-nifty {
  background: var(--accent-2);
}

.legend-smallcap {
  background: #f7a35c;
}

.performance-note {
  border-top: 1px solid var(--line);
  margin: 18px 0 0;
  padding-top: 14px;
  color: var(--quiet);
  font-size: 11px;
  line-height: 1.6;
}

.performance-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.performance-insights div {
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 13px;
}

.performance-insights span {
  display: block;
  color: var(--quiet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.performance-insights strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 12px;
  color: var(--text);
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1;
}

.performance-insights p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.signalgraph-block {
  border-top: 1px solid var(--line);
  padding: 58px 0 54px;
}

.signalgraph-grid article {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.signalgraph-description p {
  max-width: none;
}

.performance-description p {
  max-width: none;
}

.signalgraph-grid span,
.signalgraph-limitations span {
  display: block;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.signalgraph-grid p,
.signalgraph-limitations p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.signalgraph-cta {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-top: 2px;
}

.signalgraph-cta a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(215, 255, 104, 0.5);
  background: #d7ff68;
  color: #0b0d10;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.signalgraph-cta a:hover {
  border-color: #ecffad;
  background: #ecffad;
  box-shadow: 0 12px 34px rgba(215, 255, 104, 0.16);
  transform: translateY(-1px);
}

.signalgraph-cta span {
  font-size: 15px;
  line-height: 1;
}

.signalgraph-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.signalgraph-grid article {
  min-height: 240px;
  padding: 18px;
}

.signalgraph-grid h3 {
  margin: 34px 0 0;
  font-size: 22px;
  line-height: 1.08;
}

.signalgraph-limitations {
  margin-top: 16px;
}

.signalgraph-limitations span {
  color: var(--quiet);
}

.signalgraph-limitations p {
  margin-top: 7px;
  color: var(--quiet);
  font-size: 12px;
}

.cv-block {
  border-top: 1px solid var(--line);
  padding: 58px 0 54px;
}

.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(440px, 1fr);
  gap: 56px;
  align-items: start;
  margin-top: 14px;
}

.cv-intro h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.cv-intro p {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.cv-linkedin {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #0a66c2;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.cv-linkedin:hover {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.cv-linkedin svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.cv-timeline {
  display: grid;
  gap: 10px;
}

.cv-timeline article {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.cv-timeline article:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-2px);
}

.cv-timeline span {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.cv-card-meta {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  min-height: 100%;
  text-align: center;
}

.cv-card-logo {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  opacity: 0.92;
}

.cv-card-logo-wide {
  width: 92px;
}

.cv-card-with-logo {
  align-items: center;
}

.cv-card-centered-label {
  align-items: center;
}

.cv-card-centered-label > span {
  align-self: center;
  justify-self: center;
  text-align: center;
}

.cv-timeline h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.cv-timeline p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .nav-toggle {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--panel-strong);
    box-shadow: inset 3px 0 0 rgba(215, 255, 104, 0.5);
    color: var(--text);
    cursor: pointer;
    transition:
      background 180ms ease,
      border-color 180ms ease,
      box-shadow 180ms ease,
      color 180ms ease;
  }

  .nav-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    background: currentColor;
    transition:
      transform 180ms ease,
      background 180ms ease;
  }

  .nav-toggle span:nth-child(2) {
    width: 14px;
    justify-self: end;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    border-color: var(--accent);
    background: rgba(215, 255, 104, 0.07);
  }

  .topbar.menu-open .nav-toggle {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .topbar.menu-open .nav-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
  }

  .topbar.menu-open .nav-toggle span:nth-child(2) {
    transform: scaleX(0);
  }

  .topbar.menu-open .nav-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-drawer {
    display: none;
    width: 100%;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-top: 1px solid var(--line-strong);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
    border-left: 3px solid var(--accent);
    background: rgba(17, 22, 27, 0.98);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  }

  .topbar.menu-open .nav-drawer {
    display: grid;
  }

  .nav-links {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-links a {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 11px 6px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    transition:
      background 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      transform 180ms ease;
  }

  .nav-links a::before {
    color: var(--accent);
    content: ">";
    font-size: 15px;
    line-height: 1;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    transform: translateY(-1px);
  }

  .icon-links {
    position: static;
    gap: 4px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
  }

  .icon-links a {
    border-color: transparent;
    background: transparent;
  }
}

@media (max-width: 900px) {
  .site-shell {
    width: min(100% - 28px, 760px);
  }

  .hero-block {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding: 52px 0 38px;
  }

  .thesis-panel h2 {
    white-space: normal;
  }

  h1 {
    font-size: clamp(36px, 10vw, 52px);
  }

  .thesis-panel {
    padding: 22px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .signalgraph-cta {
    justify-content: flex-start;
  }

  .notes-block .section-heading h2,
  .markets-block .section-heading h2,
  .signalgraph-block .section-heading h2 {
    white-space: normal;
  }

  .note-context {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .note-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note-library {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selected-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-grid {
    grid-template-columns: 1fr;
  }

  .signalgraph-grid {
    grid-template-columns: 1fr;
  }

  .signalgraph-grid article {
    min-height: auto;
  }

  .cv-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

}

@media (max-width: 520px) {
  .site-shell {
    position: relative;
    width: min(100% - 24px, 760px);
    padding-top: 16px;
  }

  .hero-block {
    gap: 28px;
    padding: 38px 0 42px;
  }

  h1 {
    font-size: 36px;
    line-height: 1.08;
  }

  .hero-summary {
    margin-top: 22px;
    font-size: 17px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .thesis-panel {
    padding: 18px;
  }

  .thesis-panel h2 {
    font-size: 25px;
  }

  .topbar {
    padding: 8px 0;
  }

  .nav-toggle {
    width: 38px;
    height: 38px;
  }

  .nav-toggle span {
    width: 17px;
  }

  .nav-drawer {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 10px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 46px;
    height: 34px;
  }

  .brand-name {
    height: 34px;
  }

  .brand-name strong {
    font-size: 18px;
  }

  .brand-name strong span {
    font-size: 17px;
  }

  .nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
  }

  .nav-links a {
    padding: 13px 12px;
    font-size: 13px;
  }

  .icon-links {
    justify-content: center;
    margin-top: 10px;
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .icon-links a {
    width: 40px;
    height: 40px;
  }

  .thesis-form input,
  .thesis-form select,
  .thesis-form textarea {
    font-size: 16px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .button {
    padding: 0 14px;
  }

  .notes-block,
  .markets-block,
  .signalgraph-block,
  .cv-block {
    padding-top: 46px;
    padding-bottom: 46px;
  }

  .section-description {
    margin-top: 22px;
    padding: 14px;
  }

  .note-tabs {
    margin-top: 26px;
  }

  .work-card {
    min-height: auto;
  }

  .note-library {
    grid-template-columns: 1fr;
  }

  .selected-note {
    padding: 18px;
  }

  .selected-note-collapse {
    width: 100%;
  }

  .selected-note-grid {
    grid-template-columns: 1fr;
  }

  .performance-shell {
    padding: 16px;
  }

  .performance-toolbar {
    flex-direction: column;
    gap: 12px;
  }

  .performance-date {
    text-align: left;
  }

  .performance-stats {
    grid-template-columns: 1fr;
  }

  .performance-insights {
    grid-template-columns: 1fr;
  }

  #performance-chart {
    height: 320px;
  }

  .signalgraph-cta,
  .signalgraph-cta a {
    width: 100%;
  }

  .signalgraph-grid article {
    min-height: auto;
  }

  .cv-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .cv-linkedin {
    width: 46px;
  }

  .cv-timeline article {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
  }

  .cv-card-with-logo {
    align-items: stretch;
  }

  .cv-card-meta {
    width: 100%;
    min-height: auto;
    padding-bottom: 8px;
  }

}

@media (max-width: 390px) {
  .topbar {
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 42px;
    flex: 0 0 42px;
  }

  .brand-name strong {
    font-size: 15px;
    white-space: nowrap;
  }

  .brand-name strong span {
    font-size: 14px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .notes-block .section-heading h2,
  .markets-block .section-heading h2,
  .signalgraph-block .section-heading h2,
  .cv-intro h2 {
    font-size: 25px;
  }

  .nav-drawer {
    padding: 8px;
  }

  .nav-links a {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  .note-tabs {
    grid-template-columns: 1fr;
  }

  .selected-note,
  .performance-shell,
  .cv-timeline article {
    padding: 14px;
  }

  #performance-chart {
    height: 260px;
  }

  .icon-links {
    gap: 8px;
  }
}

@media (hover: none) {
  .work-card:hover,
  .nav-links a:hover,
  .icon-links a:hover,
  .button:hover,
  .signalgraph-cta a:hover,
  .cv-timeline article:hover,
  .cv-linkedin:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
