:root {
  --bg: #050505;
  --panel: rgba(7, 8, 9, 0.72);
  --panel-strong: rgba(8, 9, 10, 0.86);
  --line: rgba(112, 116, 122, 0.38);
  --text: #e8e6df;
  --text-soft: #c4c1bb;
  --muted: #9a9a9a;
  --red: #ff3434;
  --red-soft: rgba(255, 52, 52, 0.34);
  --blue: #7da2ff;
  --green: #9cff57;
  --magenta: #ff5f87;
  --sans: "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --shell-w: 1360px;
  --shell-gutter: 96px;
  --header-h: 54px;
  --video-viewer-duration: 560ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  overflow-anchor: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-header > *,
.workspace > *,
.case-row > *,
.about-panel__content > * {
  min-width: 0;
}

body.video-viewer-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: url("../media/x64dbg.jpg") center / cover no-repeat;
  animation: bg-enter 1500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bg-enter {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.42) 45%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.1) 42%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
  animation: overlay-enter 1500ms ease both;
}

@keyframes overlay-enter {
  from {
    opacity: 0;
  }
}

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

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

.site-shell,
.site-header {
  width: min(var(--shell-w), calc(100vw - var(--shell-gutter)));
}

.site-shell {
  min-height: 100vh;
  margin: 0 auto;
  padding-top: var(--header-h);
  display: flex;
  flex-direction: column;
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(8px, 2.5vw, 22px);
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.96), rgba(5, 5, 5, 0.78) 68%, rgba(5, 5, 5, 0.52));
  border-bottom: 1px solid var(--red-soft);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  animation: header-drop 900ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

@keyframes header-drop {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-100%);
  }
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.identity:focus-visible,
.site-nav a:focus-visible,
.case-row__media:focus-visible {
  outline: 1px solid var(--red-soft);
  outline-offset: 5px;
}

.identity__avatar {
  border-radius: 4px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #111;
}

.identity strong {
  font-family: var(--mono);
  font-size: clamp(12px, 2.4vw, 16px);
  font-weight: 600;
  text-transform: uppercase;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(7px, 2.2vw, 58px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(9px, 1.6vw, 12px);
}

.site-nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--nav-indicator-left);
  width: var(--nav-indicator-width);
  height: 2px;
  background: var(--red);
  transition: left 240ms ease, width 240ms ease;
}

.site-nav a {
  padding: 7px 0;
  white-space: nowrap;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a:focus-visible {
  color: var(--text);
}

main {
  flex: 1;
  padding: clamp(28px, 3.6vw, 48px) 0 clamp(32px, 4vh, 48px);
}

.intro {
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
  padding-left: 32px;
  border-left: 2px solid var(--red);
}

.section-label {
  font-family: var(--mono);
}

.intro h1 {
  max-width: 900px;
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 700;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.intro__lede {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  overflow-wrap: break-word;
}

.intro__lede a,
.about-panel p a,
.case-row p a,
.peers-panel a {
  color: var(--text);
  transition: color 160ms ease;
}

.intro__lede a:hover,
.intro__lede a:focus-visible,
.about-panel p a:hover,
.about-panel p a:focus-visible,
.case-row p a:hover,
.case-row p a:focus-visible,
.peers-panel a:hover,
.peers-panel a:focus-visible {
  color: #ff5a5a;
  outline: none;
}

.case-row p a code {
  color: inherit;
}

.intro::after {
  content: "";
  display: block;
  width: min(318px, 50vw);
  height: 1px;
  margin-top: 34px;
  background: var(--red);
  opacity: 0.82;
}

.workspace {
  width: 100%;
  max-width: 1180px;
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  margin: 56px auto 0;
}

.case-ledger {
  display: grid;
  gap: 15px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 13px;
}

.section-label::before {
  content: "";
  --section-icon: linear-gradient(transparent, transparent);
  width: 24px;
  height: 24px;
  flex: none;
  background-color: var(--red);
  -webkit-mask: var(--section-icon) center / contain no-repeat;
  mask: var(--section-icon) center / contain no-repeat;
}

.about-panel .section-label::before {
  --section-icon: url("../media/icons/unknown.svg");
}

.case-ledger .section-label::before {
  --section-icon: url("../media/icons/skull.svg");
}

.skills-index .section-label::before {
  --section-icon: url("../media/icons/code.svg");
}

.peers-panel .section-label::before {
  --section-icon: url("../media/icons/eye.svg");
}

.skills-index {
  width: min(100%, 760px);
  justify-self: center;
}

.skills-index .section-label {
  justify-content: center;
  margin-bottom: 18px;
}

.section-label h2 {
  margin: 0;
  font: inherit;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 38%, 360px);
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.case-row:hover {
  border-color: var(--red-soft);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38);
}

.case-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.case-row p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.case-row p code {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--text);
}

.case-row__media {
  display: block;
  width: 100%;
  padding: 0;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-strong);
  cursor: pointer;
  overflow: hidden;
}

.case-row__media video {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  transition: filter 220ms ease, transform 220ms ease;
}

.case-row__media:hover video,
.case-row__media:focus-visible video {
  filter: brightness(1.08);
  transform: scale(1.01);
}

.skill-tags {
  --skill-column-gap: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px var(--skill-column-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(8, 9, 10, 0.72);
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.skill__icon {
  width: var(--skill-icon-size, 20px);
  height: var(--skill-icon-size, 20px);
  flex: none;
  background-color: currentColor;
  -webkit-mask: var(--skill-icon) center / contain no-repeat;
  mask: var(--skill-icon) center / contain no-repeat;
}

.skill--reverse {
  --skill-icon: url("../media/icons/x64dbg-bug.svg");
  --skill-icon-size: 18px;
  color: var(--red);
}

.skill--low {
  --skill-icon: url("../media/icons/cpu.svg");
  color: var(--blue);
}

.skill--tools {
  --skill-icon: url("../media/icons/tool.svg");
  --skill-icon-size: 18px;
  color: var(--green);
}

.skill--agents {
  --skill-icon: url("../media/icons/n8n.svg");
  color: var(--magenta);
}

.skill--reverse,
.skill--agents {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc((100% - var(--skill-column-gap)) / 2);
}

.about-panel {
  width: 100%;
  max-width: 1040px;
  margin: clamp(46px, 6vh, 68px) auto 0;
  padding: 20px 24px 22px;
}

.about-panel .section-label {
  margin-bottom: 18px;
}

.about-panel__content {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}

.about-panel__content > h3 {
  margin: 0;
  color: var(--text);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  text-wrap: balance;
}

.about-panel__content p {
  max-width: 74ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.62;
}

.about-panel__content p + p {
  margin-top: 0.85em;
}

.peers-panel {
  width: 100%;
  margin: clamp(72px, 9vh, 120px) auto 0;
  text-align: center;
}

.peers-panel .section-label {
  justify-content: center;
  margin-bottom: 18px;
}

.peers-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 32px;
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.peers-list a {
  font-family: var(--mono);
  font-size: 14px;
}

.site-footer {
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: 18px;
  text-align: center;
}

.footer-quote {
  grid-column: 2;
  margin: 0;
  max-width: 60ch;
}

.footer-quote p {
  margin: 0;
  color: #8a8a8a;
  font-family: var(--mono);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
}

.footer-quote cite {
  display: block;
  margin-top: 6px;
  color: #6a6a6a;
  font-size: 12px;
  font-style: normal;
}

.social-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  transition: color 160ms ease, transform 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--text);
  transform: translateY(-2px);
  outline: none;
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.video-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  cursor: pointer;
}

.video-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity 360ms ease;
}

.video-viewer.is-open::before {
  opacity: 1;
}

.video-viewer__video {
  position: fixed;
  display: block;
  object-fit: cover;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  cursor: pointer;
  transform-origin: top left;
  will-change: transform;
  transition-property: transform;
  transition-duration: var(--video-viewer-duration);
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.video-viewer.is-closing {
  cursor: default;
}

.case-row.is-returning {
  position: relative;
  z-index: 81;
}

.case-row.is-returning .case-row__media {
  overflow: visible;
}

.case-row.is-returning video {
  transform-origin: top left;
  will-change: transform;
  transition: transform var(--video-viewer-duration) cubic-bezier(0.16, 1, 0.3, 1);
}

@property --reveal-in {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --reveal-out {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

@property --reveal-rise {
  syntax: "<number>";
  inherits: false;
  initial-value: 0;
}

[data-reveal] {
  animation: reveal-rise 850ms cubic-bezier(0.16, 1, 0.3, 1) 200ms backwards;
}

@keyframes reveal-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
  }
}

@supports (animation-timeline: view()) {
  [data-reveal] {
    --reveal-p: min(var(--reveal-in), var(--reveal-out));
    opacity: calc((0.42 + var(--reveal-p) * 0.58) * (1 - var(--reveal-rise)));
    transform: translateY(calc((1 - var(--reveal-p)) * 30px + var(--reveal-rise) * 26px)) scale(calc(1 - (1 - var(--reveal-p)) * 0.012));
    filter: blur(calc((1 - var(--reveal-p)) * 7px));
    animation:
      reveal-enter 850ms cubic-bezier(0.16, 1, 0.3, 1) 200ms backwards,
      reveal-in linear both,
      reveal-out linear both;
    animation-timeline: auto, view(), view();
    animation-range: normal, entry 0% entry 80%, exit 10% exit 70%;
  }

  .skills-index[data-reveal] {
    animation-range: normal, cover 0% cover 45%, exit 10% exit 70%;
  }

  @keyframes reveal-enter {
    from { --reveal-rise: 1; }
  }

  @keyframes reveal-in {
    from { --reveal-in: 0; }
  }

  @keyframes reveal-out {
    to { --reveal-out: 0; }
  }
}

@media (max-width: 1020px) {
  :root {
    --shell-w: 960px;
    --shell-gutter: 40px;
  }

  .skills-index {
    margin-top: 18px;
  }
}

@media (max-width: 720px) {
  :root {
    --shell-w: 640px;
    --shell-gutter: 28px;
  }

  .intro {
    padding-left: 18px;
  }

  .intro h1 {
    max-width: 100%;
    font-size: clamp(36px, 10.6vw, 42px);
    overflow-wrap: normal;
  }

  .intro__lede {
    max-width: 34ch;
    font-size: 15.5px;
    overflow-wrap: anywhere;
  }

  .case-row p,
  .about-panel__content p {
    max-width: 40ch;
    overflow-wrap: anywhere;
  }

  .case-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .about-panel {
    margin-top: 34px;
    padding: 16px;
  }

  .about-panel__content {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skill-tags {
    grid-template-columns: 1fr;
  }

  .skill--reverse,
  .skill--agents {
    grid-column: auto;
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
  }

  .footer-quote {
    grid-column: 1;
  }

  .site-footer .social-links {
    grid-column: 1;
    justify-self: center;
  }
}

@media (max-width: 360px) {
  .intro h1 {
    font-size: 34px;
  }
}

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

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}