:root {
  --color-frame: #141517;
  --color-background: #1c1d20;
  --color-surface: #25272b;
  --color-surface-sunken: #212226;
  --color-border: #34363c;
  --color-text: #b9bcc3;
  --color-title: #a9adb5;
  --color-display-title: rgba(95, 196, 214, 0.3);
  --color-display-title-edge: #25272b;
  --color-muted: #7c8089;
  --color-accent: #5fc4d6;
  --color-accent-muted: rgba(95, 196, 214, 0.35);
  --color-selection: #2c3a4a;
  --color-pattern: rgba(225, 227, 231, 0.05);
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --frame-width: 14px;
  --sheet-width: 720px;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  background: var(--color-frame);
  color: var(--color-text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

a {
  color: inherit;
}

::selection {
  background: var(--color-selection);
  color: var(--color-title);
}

h1,
h2,
h3 {
  color: var(--color-title);
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-wrap: balance;
}

.page {
  background: var(--color-background);
  margin: var(--frame-width);
  min-height: calc(100vh - 2 * var(--frame-width));
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.label {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.display-title {
  width: fit-content;
  color: transparent;
  background-image:
    url("/assets/lattice.svg"),
    linear-gradient(var(--color-display-title), var(--color-display-title)),
    linear-gradient(var(--color-background), var(--color-background));
  background-size: 28px 28px, 100% 100%, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(1px 1px 0 var(--color-display-title-edge))
    drop-shadow(1px 1px 0 var(--color-display-title-edge))
    drop-shadow(1px 1px 0 var(--color-display-title-edge));
}

.header {
  display: flex;
  align-items: center;
  gap: 1.6em;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--color-border);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header a {
  text-decoration: none;
}

.wordmark {
  color: var(--color-title);
  font-weight: 700;
}

.wordmark-domain {
  color: var(--color-accent);
}

.header-links {
  display: flex;
  gap: 1.6em;
  margin-left: auto;
}

.header-links a {
  color: var(--color-muted);
}

.header-links a {
  transition: color 0.15s;
}

.header-links a:hover,
.header-links a[aria-current="page"] {
  color: var(--color-accent);
}

.header-links a[aria-current="page"]::before {
  content: "▸ ";
  color: var(--color-accent);
}

.hero {
  padding: 64px var(--gutter) 48px;
  border-bottom: 1px solid var(--color-border);
}

.hero-name {
  margin: 0 0 24px;
  font-size: clamp(40px, 6.5vw, 96px);
  font-stretch: 75%;
  line-height: 0.85;
}

.hero-name span {
  display: block;
}

.hero-tagline {
  display: inline-flex;
  flex-direction: column;
  margin: 0 0 36px;
  font-size: clamp(16px, 2vw, 22px);
}

.sound-wave {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  margin-top: 8px;
}

.sound-wave-dot {
  width: 3px;
  height: 3px;
  background: var(--color-accent-muted);
  animation: sound-wave-pulse 2.4s ease-in-out infinite;
  animation-delay: calc(var(--dot-index) * 0.03s);
}

@keyframes sound-wave-pulse {
  0%,
  14%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }

  7% {
    transform: translateY(-9px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-wave-dot {
    animation: none;
  }
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-actions {
  justify-content: center;
  margin-top: 32px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-title);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
}

.button-icon .icon {
  width: 22px;
  height: 22px;
}

.button:hover {
  border-color: var(--color-accent);
  transform: translate(-3px, -3px);
  box-shadow: 3px 3px 0 var(--color-accent);
}

.field-record {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 1px;
  background: var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 20px;
  text-align: left;
  background: var(--color-background);
  color: var(--color-title);
  font-family: var(--display);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.15;
}

.shimmer {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.15s;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    conic-gradient(at 2px 2px, transparent 75%, rgba(95, 196, 214, 0.55) 0),
    conic-gradient(at 2px 2px, transparent 75%, rgba(95, 196, 214, 0.3) 0);
  background-size: 6px 6px, 12px 12px;
  background-position: 0 0, 3px 3px;
  -webkit-mask: linear-gradient(115deg, transparent 42%, #000 47%, #000 53%, transparent 58%) 100% 0 / 300% 100% no-repeat;
  mask: linear-gradient(115deg, transparent 42%, #000 47%, #000 53%, transparent 58%) 100% 0 / 300% 100% no-repeat;
}

.shimmer:hover {
  z-index: 1;
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--color-accent-muted);
}

.shimmer:hover::after {
  animation: pixel-crawl 0.6s steps(9) forwards;
}

@keyframes pixel-crawl {
  0% {
    opacity: 1;
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }

  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shimmer,
  .shimmer:hover {
    transform: none;
    transition: none;
  }

  .shimmer:hover::after {
    animation: none;
  }
}

.interest-tile,
.contact-tile {
  text-decoration: none;
}

.interest-tabs {
  display: flex;
  overflow-x: auto;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--color-border);
  scrollbar-width: none;
}

.interest-tab {
  display: flex;
  align-items: center;
  padding: 14px 20px 12px;
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.interest-tab:hover {
  color: var(--color-title);
  background: var(--color-surface);
}

.interest-tab-selected {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.interest-tab-icon {
  display: flex;
}

.interest-tab-icon .icon {
  width: 30px;
  height: 30px;
  color: inherit;
}

.interest-note-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.5em;
}

.interest-note-heading h2 {
  margin: 0;
  font-size: 28px;
}

.contact-tile {
  text-decoration: none;
}

.contact-tile-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-tile-handle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  transition: color 0.15s;
}

.contact-tile:hover .contact-tile-handle {
  color: var(--color-accent);
}

.cell-icon {
  display: flex;
  flex-shrink: 0;
}

.icon {
  width: 44px;
  height: 44px;
  color: var(--color-title);
}

.icon-highlight {
  stroke: var(--color-accent);
}

.icon-node {
  fill: var(--color-background);
}

.cell-tick {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--color-accent);
}

.band {
  position: relative;
  isolation: isolate;
  clip-path: inset(0);
  padding: 64px var(--gutter);
  border-bottom: 1px solid var(--color-border);
}

.band::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--color-pattern);
  -webkit-mask: url("/assets/lattice.svg") 0 0 / 60px 60px repeat;
  mask: url("/assets/lattice.svg") 0 0 / 60px 60px repeat;
}

.band-spacer {
  height: 96px;
  padding: 0;
}

.sheet-stack {
  display: grid;
  gap: 48px;
}

.page-title {
  padding: 56px var(--gutter) 36px;
  border-bottom: 1px solid var(--color-border);
}

.page-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 72px);
  font-stretch: 75%;
}

.sheet {
  max-width: var(--sheet-width);
  margin: 0 auto;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  box-shadow: 8px 8px 0 var(--color-accent-muted);
}

.sheet-bar {
  padding: 7px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-accent);
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sheet-body {
  padding: 40px 48px;
}

.job-cards {
  display: grid;
  gap: 28px;
  max-width: var(--sheet-width);
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
}

.job-card {
  padding: 32px 40px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
}

.job-card .prose h2 {
  margin-top: 0;
}

.job-card .prose h2 a {
  border-bottom: 0;
}

.job-card .prose h2 a:hover {
  color: var(--color-accent);
}

.prose .domain-value {
  color: var(--color-accent);
}

.prose .tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}

.prose .tech-pills li {
  padding: 2px 10px;
  border: 1px solid var(--color-accent-muted);
  border-radius: 999px;
  background: rgba(95, 196, 214, 0.08);
  color: var(--color-accent);
  font-size: 12px;
  line-height: 1.6;
}

.prose .tech-pills li::marker {
  content: none;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li:last-child .post-row {
  border-bottom: 0;
}

.post-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: baseline;
  padding: 14px 8px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.post-row:hover {
  background: var(--color-surface);
}

.post-row:hover .post-title {
  color: var(--color-accent);
}

.post-number,
.post-date {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

.post-number {
  color: var(--color-accent);
}

.post-title {
  color: var(--color-title);
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
  font-stretch: 85%;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.15;
  transition: color 0.15s;
}

.prose {
  font-size: 14px;
  line-height: 1.75;
}

.prose > :first-child {
  margin-top: 0;
}

.prose > :last-child {
  margin-bottom: 0;
}

.prose h1 {
  font-size: 40px;
}

.prose h2 {
  margin: 2.2em 0 0.6em;
  font-size: 28px;
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 20px;
}

.prose a {
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
}

.prose a:hover {
  color: var(--color-accent);
}

.prose strong {
  color: var(--color-title);
  font-weight: 700;
}

.prose code {
  padding: 0.05em 0.3em;
  border: 1px solid var(--color-border);
  background: var(--color-surface-sunken);
  font-size: 0.9em;
}

.prose pre {
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  background: var(--color-surface-sunken);
  box-shadow: 4px 4px 0 var(--color-accent-muted);
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
}

.prose pre.mermaid {
  background: none;
  box-shadow: none;
  text-align: center;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 2px 18px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface-sunken);
}

.prose ul {
  padding-left: 1.2em;
  list-style: square;
}

.prose li::marker {
  color: var(--color-accent);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  border: 1px solid var(--color-border);
  padding: 6px 10px;
  text-align: left;
}

.prose th {
  background: var(--color-surface);
  color: var(--color-title);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prose img {
  max-width: 100%;
  border: 1px solid var(--color-border);
}

.markdown-alert-warning,
.markdown-alert-caution {
  border-left-color: #e5534b !important;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gutter);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-motto {
  margin: 0;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

@media (max-width: 760px) {
  :root {
    --frame-width: 8px;
  }

  .header {
    flex-wrap: wrap;
    gap: 10px 1.2em;
  }

  .header-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1.2em;
  }

  .field-record {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-tiles {
    grid-template-columns: 1fr;
  }

  .sheet-body {
    padding: 28px 20px;
  }

  .job-card {
    padding: 24px 20px;
  }

  .post-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .post-date {
    grid-column: 2;
  }
}
