@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Urbanist:wght@700;800&display=swap");

:root {
  --bg: #ffffff;
  --text: #0d1117;
  --muted: #69707c;
  --line: #e6e8ec;
  --soft: #f6f7f8;
  --chip: #eef0f2;
  --panel: #ffffff;
  --panel-raised: #fafafa;
  --hover: #f0f2f4;
  --strong: #000000;
  --copy: #1a1d21;
  --primary-bg: #0d1117;
  --primary-text: #ffffff;
  --focus: #0d1117;
  --blue: #4d86e9;
  --blue-soft: #9bb4d3;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  --radius: 10px;
  --thumb-radius: 28px;
  --page: 1280px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090d13;
  --text: #e9edf5;
  --muted: #a1aab7;
  --line: #26303d;
  --soft: #101721;
  --chip: #1b2531;
  --panel: #111821;
  --panel-raised: #151e2a;
  --hover: #1b2634;
  --strong: #f7f9fc;
  --copy: #d7dee8;
  --primary-bg: #f7f9fc;
  --primary-text: #0b0f14;
  --focus: #9fb9ff;
  --blue: #78a7ff;
  --blue-soft: #7f9fc8;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, Ubuntu, "Trebuchet MS", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

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

.topbar {
  display: flex;
  justify-content: center;
  padding: 8px 18px 0;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 22px;
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.nav-pill a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 9px;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.nav-pill a:hover,
.nav-pill a:focus-visible {
  border-color: #6f7782;
  background: var(--hover);
  color: var(--strong);
  outline: none;
}

.nav-pill a.active {
  border-color: var(--focus);
}

.nav-pill a.active:hover,
.nav-pill a.active:focus-visible {
  border-color: var(--focus);
}

.ico {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  color: currentColor;
  transition: transform 160ms ease;
}

.nav-pill a:hover .ico,
.nav-pill a:focus-visible .ico {
  transform: translateY(-1px);
}

.ico svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle {
  appearance: none;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(77, 134, 233, 0.12), transparent 62%),
    var(--panel);
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 8px 20px rgba(13, 17, 23, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 100%;
  height: 100%;
}

.theme-toggle-track::before {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 22px;
  border-radius: 999px;
  background: var(--primary-bg);
  box-shadow: 0 5px 14px rgba(13, 17, 23, 0.22);
  transition:
    background-color 160ms ease,
    transform 180ms ease;
}

.theme-icon {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.theme-icon-moon {
  color: var(--primary-text);
}

.theme-icon-sun {
  color: var(--muted);
  opacity: 0.72;
}

html[data-theme="dark"] .theme-toggle {
  background:
    radial-gradient(circle at 74% 34%, rgba(120, 167, 255, 0.28), transparent 38%),
    var(--panel-raised);
}

html[data-theme="dark"] .theme-toggle-track::before {
  transform: translateX(22px);
}

html[data-theme="dark"] .theme-icon-moon {
  color: var(--muted);
  opacity: 0.72;
}

html[data-theme="dark"] .theme-icon-sun {
  color: var(--primary-text);
  opacity: 1;
}

main {
  width: min(var(--page), calc(100% - 56px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 86px;
  align-items: start;
  padding: 20px 18px 20px;
}

.hero-left {
  padding-top: 42px;
}

.network-orb {
  width: 300px;
  height: 300px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
}

.network-orb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  line-height: 1;
}

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.socials a:hover,
.socials a:focus-visible {
  border-color: var(--line);
  background: var(--soft);
  transform: translateY(-1px);
}

.socials svg {
  display: block;
  width: 20px;
  height: 20px;
}

.socials path,
.socials rect,
.socials circle {
  stroke: currentColor;
}

.socials a[aria-label="GitHub"] svg,
.socials a[aria-label="LinkedIn"] svg {
  fill: currentColor;
}

.socials a[aria-label="GitHub"] path,
.socials a[aria-label="LinkedIn"] path {
  stroke: none;
}

.socials a[aria-label="Email"] svg,
.socials a[aria-label="Contact"] svg {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-copy {
  padding-top: 54px;
}

.hero h1 {
  margin: 0 0 8px;
  color: var(--strong);
  font-family: Urbanist, Manrope, Ubuntu, "Trebuchet MS", Arial, sans-serif;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.role-pill,
.title-line span {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 1px 10px;
  background: var(--chip);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.hero-copy p {
  max-width: 640px;
  margin: 16px 0 0;
  color: var(--copy);
  font-size: 17px;
  font-weight: 500;
}

.hero-copy .lead {
  margin-top: 28px;
  color: var(--strong);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.hero-action-primary {
  border-color: var(--primary-bg);
  background: var(--primary-bg);
  color: var(--primary-text);
}

.hero-action:hover,
.hero-action:focus-visible {
  border-color: var(--focus);
  transform: translateY(-1px);
}

.hero-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-quote {
  max-width: 520px;
  margin: 18px 0 0 86px;
}

.hero-quote img {
  display: block;
  width: 100%;
  max-width: 438px;
  height: auto;
}

html[data-theme="dark"] .hero-quote img {
  filter: invert(1) brightness(1.16);
}

.projects {
  margin-top: 0;
}

.anchor-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.projects-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 10px;
  padding: 8px 0 20px 24px;
  border-bottom: 1px solid var(--line);
}

.projects-heading-copy {
  display: grid;
  gap: 6px;
}

.projects-heading-copy > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.projects-heading h2 {
  position: relative;
  margin: 0;
  color: var(--strong);
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
}

.projects-heading h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--primary-bg);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 6px;
}

.project-filters button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.project-filters button span {
  color: currentColor;
  font-size: 10px;
  opacity: 0.7;
}

.project-filters button:hover,
.project-filters button:focus-visible,
.project-filters button.active {
  border-color: var(--focus);
  transform: translateY(-1px);
}

.project-filters button.active {
  background: var(--primary-bg);
  color: var(--primary-text);
}

.project-filters .tag-poc:not(.active) {
  background: var(--panel);
}

.project-filters .tag-delivered:not(.active) {
  border-color: #ddf2e4;
  background: #f3fbf5;
  color: #3d654f;
}

.project-filters .tag-completed:not(.active) {
  border-color: #dde9f8;
  background: #f4f8ff;
  color: #425a7d;
}

.project-filters .tag-planned:not(.active) {
  border-color: #f2e7c5;
  background: #fffaf0;
  color: #735f32;
}

.project-row {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr) 285px;
  gap: 26px;
  align-items: stretch;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel);
}

.project-row:first-of-type {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.project-row:last-of-type {
  border-bottom: 1px solid var(--line);
  border-bottom-right-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.project-row.is-hidden {
  display: none;
}

.project-row.is-first-visible {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.project-row.is-last-visible {
  border-bottom: 1px solid var(--line);
  border-bottom-right-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.visual {
  min-height: 184px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--thumb-radius);
  overflow: hidden;
}

.thumbnail-visual {
  position: relative;
  align-self: center;
  aspect-ratio: 1756 / 895;
  min-height: 0;
  cursor: zoom-in;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.thumbnail-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbnail-visual::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(13, 17, 23, 0.14);
  border-radius: 999px;
  background:
    rgba(255, 255, 255, 0.9)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%230d1117' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3M11 8v6M8 11h6'/%3E%3C/g%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
  opacity: 0;
  transform: translateY(3px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.thumbnail-visual:hover,
.thumbnail-visual:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 10px 24px rgba(13, 17, 23, 0.08);
}

.thumbnail-visual:hover::after,
.thumbnail-visual:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.project-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border: 1px solid rgba(13, 17, 23, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d1117;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-status.delivered {
  border-color: #ddf2e4;
  background: #f3fbf5;
  color: #3d654f;
}

.project-status.completed {
  border-color: #dde9f8;
  background: #f4f8ff;
  color: #425a7d;
}

.project-status.planned {
  border-color: #f2e7c5;
  background: #fffaf0;
  color: #735f32;
}

html[data-theme="dark"] .project-status {
  border-color: #3a4656;
  background: rgba(17, 24, 33, 0.94);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .project-status.delivered,
html[data-theme="dark"] .project-filters .tag-delivered:not(.active) {
  border-color: #234b35;
  background: #12231a;
  color: #9ce0b4;
}

html[data-theme="dark"] .project-status.completed,
html[data-theme="dark"] .project-filters .tag-completed:not(.active) {
  border-color: #2a4369;
  background: #121f34;
  color: #a7c7ff;
}

html[data-theme="dark"] .project-status.planned,
html[data-theme="dark"] .project-filters .tag-planned:not(.active) {
  border-color: #56451f;
  background: #2a2212;
  color: #f0d38b;
}

.project-copy {
  padding: 0;
}

.title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 2px 0 9px;
}

.title-line h3 {
  margin: 0;
  color: var(--strong);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
}

.title-line span {
  font-size: 12px;
  font-weight: 700;
}

.project-copy p {
  margin: 0;
  color: var(--copy);
  font-size: 14.2px;
  font-weight: 600;
  line-height: 1.45;
}

.project-copy .meta-line {
  margin-top: 8px;
  font-size: 12.8px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.project-link:hover,
.project-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.project-link::before {
  content: "";
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.github-link::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230d1117' d='M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82A7.65 7.65 0 0 1 8 4.58c.68 0 1.36.09 2 .24 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z'/%3E%3C/svg%3E");
}

.site-link::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230d1117' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M6.5 3.5h-3v9h9v-3M9 3.5h3.5V7M12.5 3.5 7.2 8.8'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .github-link::before,
html[data-theme="dark"] .site-link::before,
html[data-theme="dark"] .case-study summary::after {
  filter: invert(1);
}

.proof {
  min-height: 154px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}

.proof h4 {
  margin: 0 0 12px;
  color: var(--strong);
  font-size: 13px;
  font-weight: 800;
}

.proof ul {
  margin: 0;
  padding-left: 18px;
}

.proof li {
  margin: 0 0 12px;
  color: var(--copy);
  font-size: 13px;
  font-weight: 600;
}

.visual b {
  display: block;
  color: #0a0d10;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
}

svg {
  display: block;
}

.eeg-visual {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr 0.9fr;
  gap: 12px;
  padding: 14px 16px;
}

.eeg {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: start;
  gap: 7px 8px;
}

.eeg b {
  grid-column: 1 / -1;
  text-align: center;
}

.eeg span {
  color: #111111;
  font-size: 10px;
  font-weight: 800;
}

.eeg i {
  position: relative;
  height: 11px;
  background:
    linear-gradient(90deg, transparent 0 6%, var(--blue) 6% 7%, transparent 7% 24%, var(--blue) 24% 25%, transparent 25% 42%, var(--blue) 42% 43%, transparent 43% 70%, var(--blue) 70% 71%, transparent 71%),
    linear-gradient(var(--blue), var(--blue)) center / 100% 1px no-repeat;
}

.eeg small {
  grid-column: 2;
  justify-self: end;
  color: #000000;
  font-size: 9px;
  font-weight: 800;
}

.flow {
  display: grid;
  gap: 8px;
  align-content: center;
}

.flow span {
  display: grid;
  place-items: center;
  min-height: 19px;
  border: 1px solid #c4c8ce;
  border-radius: 4px;
  color: #111111;
  font-size: 9.5px;
  font-weight: 800;
}

.flow span + span {
  position: relative;
}

.flow span + span::before {
  content: "↓";
  position: absolute;
  top: -12px;
  color: #000000;
  font-size: 11px;
}

.matrix {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.matrix b {
  text-align: center;
}

.matrix table,
.truth table,
.table-panel table {
  border-collapse: collapse;
}

.matrix th,
.matrix td {
  width: 28px;
  height: 26px;
  border: 1px solid #b9c1ca;
  background: #eaf0f8;
  color: #000000;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.matrix th {
  background: #ffffff;
}

.mlp-visual,
.chart-visual,
.linear-visual {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.7fr;
  gap: 8px;
  padding: 12px 14px;
}

.network {
  width: 100%;
  height: 100%;
}

.network path {
  fill: none;
  stroke: #9ca3ad;
  stroke-width: 1.2;
}

.network circle {
  fill: #ffffff;
  stroke: #3b3f45;
  stroke-width: 1.1;
}

.scatter-card,
.hist-card {
  min-height: 116px;
  border-left: 1px solid #edf0f3;
}

.scatter-card {
  padding: 8px;
}

.scatter-card b {
  text-align: center;
}

.scatter-card span {
  display: block;
  height: 82px;
  margin-top: 6px;
  background:
    radial-gradient(circle at 24% 28%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 44% 62%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 64% 42%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 76% 72%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 34% 78%, var(--blue) 0 1.5px, transparent 1.7px);
}

.hist-card {
  display: flex;
  align-items: end;
  gap: 4px;
  padding: 14px 10px 8px;
}

.hist-card i,
.mini-bars i {
  flex: 1;
  height: var(--h);
  background: var(--blue-soft);
}

.chart-visual,
.linear-visual {
  grid-template-columns: 1fr;
  padding: 9px 13px;
}

.chart-visual svg,
.linear-visual svg {
  width: 100%;
  height: 134px;
}

.plot path:first-child,
.contours rect,
.contours ellipse,
.krpsim-visual path,
.matrix-visual path,
.boole-visual path,
.explore-visual path,
.leaf-visual path,
.net-visual path,
.shell-visual path,
.cube-visual path,
.irc-visual path {
  fill: none;
  stroke: #22272d;
  stroke-width: 1.1;
}

.plot .blue,
.blue {
  fill: none;
  stroke: var(--blue) !important;
  stroke-width: 1.5;
}

.plot circle {
  fill: var(--blue);
}

.bars rect {
  fill: var(--blue-soft);
}

.bars text {
  fill: #000000;
  font-size: 9px;
  font-weight: 800;
}

.contours rect,
.contours ellipse {
  stroke: #d6dbe1;
}

.contours circle {
  fill: var(--blue);
}

.krpsim-visual,
.explore-visual,
.leaf-visual,
.stack-visual,
.net-visual,
.shell-visual,
.game-visual,
.cube-visual,
.irc-visual,
.docker-visual,
.philo-visual,
.planning-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.panel {
  position: relative;
  min-height: 76px;
  padding: 8px;
  border: 1px solid #edf0f3;
}

.gantt span {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: 10px;
  background: var(--blue-soft);
}

.graph svg {
  width: 100%;
  height: 62px;
}

.graph circle {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1;
}

.graph rect {
  fill: #ffffff;
  stroke: #000000;
  stroke-width: 1;
}

.table-panel table {
  width: 100%;
  margin-top: 6px;
}

.table-panel td {
  padding: 2px 3px;
  color: #000000;
  font-size: 8px;
  font-weight: 700;
}

.mini-bars {
  display: flex;
  align-items: end;
  gap: 6px;
}

.mini-bars b {
  position: absolute;
  top: 8px;
  left: 8px;
}

.mini-bars i {
  margin-top: 28px;
}

.matrix-visual,
.boole-visual {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.matrix-code pre {
  margin: 8px 0 0;
  color: #000000;
  font-family: Manrope, Ubuntu, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.vector svg {
  width: 100%;
  height: 94px;
  margin-top: 5px;
}

.truth table {
  width: 100%;
  margin-top: 8px;
}

.truth th,
.truth td {
  padding: 3px;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.formulas p {
  margin: 9px 0 0;
  color: #000000;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.circuit svg {
  width: 100%;
  height: 84px;
  margin-top: 8px;
}

.explore-visual,
.leaf-visual,
.stack-visual,
.net-visual,
.shell-visual,
.game-visual,
.cube-visual,
.irc-visual,
.docker-visual,
.philo-visual {
  grid-template-columns: 1fr 1fr;
}

.explore-visual .table-panel,
.leaf-visual .table-panel,
.stack-visual .mini-bars,
.net-visual .table-panel,
.shell-visual .graph,
.game-visual .formulas,
.cube-visual .terminal-panel,
.irc-visual .terminal-panel,
.docker-visual .terminal-panel,
.philo-visual .table-panel {
  min-height: 76px;
}

.planning-visual .table-panel {
  min-height: 76px;
}

.scatter-panel span {
  display: block;
  height: 58px;
  margin-top: 8px;
  background:
    radial-gradient(circle at 20% 40%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 36% 28%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 54% 62%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 72% 38%, var(--blue) 0 1.5px, transparent 1.7px),
    radial-gradient(circle at 82% 72%, var(--blue) 0 1.5px, transparent 1.7px);
}

.learning-panel svg,
.leaf-panel svg,
.ray-panel svg {
  width: 100%;
  height: 72px;
  margin-top: 4px;
}

.learning-panel path {
  stroke: var(--blue);
  stroke-width: 1.6;
}

.leaf-panel path:first-of-type {
  fill: #eef3ee;
  stroke: #22272d;
}

.stacks-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stacks-panel b {
  grid-column: 1 / -1;
}

.stacks-panel ol {
  display: grid;
  align-content: end;
  gap: 4px;
  min-height: 72px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stacks-panel li {
  padding: 3px 5px;
  border: 1px solid #cbd1d8;
  background: #eef3f8;
  color: #000000;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.wide {
  grid-column: span 2;
}

.terminal-panel pre {
  margin: 8px 0 0;
  color: #000000;
  font-family: Manrope, Ubuntu, Arial, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-top: 8px;
}

.tiles > * {
  aspect-ratio: 1;
  border: 1px solid #cbd1d8;
  background: #eef1f4;
}

.tiles span {
  background: #171b20;
}

.tiles b {
  background: var(--blue);
}

.tiles i {
  background: #ffffff;
}

.tiles em,
.tiles strong {
  background: var(--blue-soft);
}

.ray-panel path:first-of-type {
  fill: #eef1f4;
}

.containers-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.containers-panel b {
  grid-column: 1 / -1;
}

.containers-panel span {
  display: grid;
  place-items: center;
  min-height: 28px;
  border: 1px solid #cbd1d8;
  border-radius: 4px;
  background: #eef3f8;
  color: #000000;
  font-size: 9px;
  font-weight: 800;
}

.calendar-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 18px repeat(3, 20px);
  gap: 4px;
  margin-top: 8px;
}

.calendar-grid span {
  display: grid;
  place-items: center;
  border: 1px solid #d7dce2;
  background: #ffffff;
  color: #000000;
  font-size: 8px;
  font-weight: 800;
}

.calendar-grid::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 2 / -1;
  border: 1px solid #edf0f3;
  background:
    linear-gradient(90deg, transparent calc(20% - 1px), #edf0f3 calc(20% - 1px) 20%, transparent 20% calc(40% - 1px), #edf0f3 calc(40% - 1px) 40%, transparent 40% calc(60% - 1px), #edf0f3 calc(60% - 1px) 60%, transparent 60% calc(80% - 1px), #edf0f3 calc(80% - 1px) 80%, transparent 80%),
    linear-gradient(#ffffff, #ffffff);
}

.calendar-grid i {
  grid-column: var(--x) / span var(--w);
  grid-row: calc(var(--y) + 1);
  align-self: center;
  height: 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  z-index: 1;
}

.case-studies {
  margin-top: 22px;
  padding: 0 0 8px;
}

.case-studies-heading {
  display: grid;
  gap: 6px;
  padding: 8px 0 20px 24px;
}

.case-studies-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.case-studies-heading h2 {
  position: relative;
  margin: 0;
  color: var(--strong);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.case-studies-heading h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--primary-bg);
}

.case-study-list {
  display: grid;
  gap: 10px;
}

.case-study {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.case-study summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 22px;
  cursor: pointer;
  list-style: none;
}

.case-study summary::-webkit-details-marker {
  display: none;
}

.case-study summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
}

.case-study summary::after {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%230d1117' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 160ms ease;
}

.case-study[open] summary {
  border-bottom: 1px solid var(--line);
}

.case-study[open] summary::after {
  transform: rotate(180deg);
}

.case-study-title {
  color: var(--strong);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.case-study-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.case-study-grid section {
  min-height: 150px;
  padding: 18px 18px 20px;
  background: var(--panel);
}

.case-study-grid h3 {
  margin: 0 0 10px;
  color: var(--strong);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.case-study-grid p {
  margin: 0;
  color: var(--copy);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1.25fr 1.35fr;
  gap: 10px;
  margin-top: 12px;
  padding-bottom: 18px;
}

.info-box {
  min-height: 112px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.info-box h2 {
  margin: 0 0 12px;
  color: var(--strong);
  font-size: 16px;
  font-weight: 800;
}

.info-box p,
.info-box li {
  margin: 0;
  color: var(--copy);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.info-box li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: baseline;
}

.contact-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0;
}

.info-box ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-box li::before {
  content: "◉";
  font-size: 8px;
}

.contact-list li::before {
  align-self: center;
  margin: 0;
}

.stack-groups {
  display: grid;
  gap: 9px;
}

.stack-group h3 {
  margin: 0 0 3px;
  color: var(--strong);
  font-size: 12px;
  font-weight: 800;
}

.stack-group p {
  margin: 0;
  color: var(--copy);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.contact-list a {
  color: inherit;
  text-decoration: none;
}

.contact-list a:hover,
.contact-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.email-row {
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
}

.email-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.email-actions a {
  min-width: 0;
}

.copy-email {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.copy-email:hover,
.copy-email:focus-visible {
  border-color: var(--focus);
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 22px;
  width: min(var(--page), calc(100% - 56px));
  margin: 34px auto 0;
  padding: 46px 18px 42px;
}

.footer-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.footer-link {
  appearance: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  border-color: var(--line);
  background: var(--soft);
  color: var(--strong);
  outline: none;
  transform: translateY(-1px);
}

.footer-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.footer-link-stroke svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.thumbnail-lightbox {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(13, 17, 23, 0.28);
}

.thumbnail-lightbox::backdrop {
  background: rgba(13, 17, 23, 0.58);
}

.thumbnail-lightbox[open] {
  display: grid;
  gap: 12px;
}

.thumbnail-lightbox figure {
  margin: 0;
}

.thumbnail-lightbox img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.thumbnail-lightbox figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.lightbox-close {
  appearance: none;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--focus);
}

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

.two-cols {
  columns: 2;
}

@media (max-width: 1180px) {
  .project-row {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  }

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

  .proof {
    grid-column: 1 / -1;
    min-height: auto;
  }
}

@media (max-width: 980px) {
  main {
    width: min(100% - 28px, var(--page));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-inline: 0;
  }

  .hero-left {
    padding-top: 24px;
  }

  .hero-copy {
    padding-top: 0;
    text-align: center;
  }

  .hero-copy p {
    margin-inline: auto;
    text-align: left;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-quote {
    margin-inline: auto;
    text-align: left;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(13, 17, 23, 0.06);
  }

  .project-row:first-of-type {
    margin-top: 0;
    border-radius: var(--radius);
  }

  .project-row:last-of-type {
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .proof {
    min-height: auto;
  }

  .case-studies-heading {
    padding-left: 0;
  }

  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .case-study-grid section {
    grid-column: auto;
  }

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

@media (max-width: 620px) {
  .topbar {
    padding-inline: 10px;
  }

  .nav-pill {
    width: 100%;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .nav-pill a {
    height: 34px;
    gap: 7px;
    padding: 0 6px;
  }

  .theme-toggle {
    width: 50px;
    height: 30px;
  }

  .network-orb {
    width: 230px;
    height: 230px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .role-pill,
  .title-line span {
    max-width: 100%;
    min-height: 24px;
    line-height: 1.2;
    white-space: normal;
  }

  .hero-quote {
    max-width: 360px;
  }

  .projects-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 10px;
    padding: 4px 0 18px;
  }

  .projects-heading h2 {
    font-size: 34px;
  }

  .project-filters {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .case-studies {
    margin-top: 18px;
  }

  .case-studies-heading {
    padding: 4px 0 14px;
  }

  .case-studies-heading h2 {
    font-size: 34px;
  }

  .case-study summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 15px 18px;
  }

  .case-study summary::after {
    position: absolute;
    top: 18px;
    right: 18px;
  }

  .case-study-meta {
    padding-right: 28px;
    text-align: left;
  }

  .eeg-visual,
  .mlp-visual,
  .matrix-visual,
  .boole-visual,
  .explore-visual,
  .leaf-visual,
  .stack-visual,
  .net-visual,
  .shell-visual,
  .game-visual,
  .cube-visual,
  .irc-visual,
  .docker-visual,
  .philo-visual,
  .planning-visual {
    grid-template-columns: 1fr;
  }

  .krpsim-visual,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
  }
}
