:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-chrome: #0d0d0f;
  --bg-console: #070708;
  --border: #1b1b1e;
  --border-soft: #17171a;
  --border-strong: #2a2a2e;
  --dot: #3a3a3e;
  --text: #cfcec7;
  --text-bright: #f0efe8;
  --text-muted: #9d9c94;
  --text-dim: #7d7c74;
  --accent: #8d88bd;
  --accent-bright: #b4afdb;
  --accent-soft: rgba(141, 136, 189, 0.35);
  --prompt: #7fa66a;
  --hover: #141416;
  --gutter: clamp(20px, 5vw, 56px);
  --font: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #e9e3d7;
  --bg-chrome: #ded6c5;
  --bg-console: #fdfcf9;
  --border: #cec7b7;
  --border-soft: #ded7c8;
  --border-strong: #b9b0a0;
  --dot: #c2baa9;
  --text: #22201c;
  --text-bright: #100f0d;
  --text-muted: #5d584f;
  --text-dim: #6d675c;
  --accent: #574ea0;
  --accent-bright: #3b3379;
  --accent-soft: rgba(87, 78, 160, 0.35);
  --prompt: #37703f;
  --hover: #e0d9ca;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: var(--bg-chrome);
  border: 1px solid var(--accent);
  z-index: 10;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.dim {
  color: var(--text-dim);
}

.chrome {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border);
}

.chrome-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px var(--gutter);
}

.chrome-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

.path {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.chrome-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
}

.nav {
  display: flex;
  gap: clamp(14px, 3vw, 24px);
  font-size: 13px;
}

.nav a {
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
}

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


.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font: inherit;
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.theme-toggle .icon-sun,
:root[data-theme='light'] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme='light'] .theme-toggle .icon-sun {
  display: block;
}

main {
  max-width: 1080px;
  margin: 0 auto;
}

.section {
  padding: clamp(40px, 7vw, 64px) var(--gutter);
  border-top: 1px solid var(--border);
}

.section:first-child {
  border-top: none;
}

.prompt {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--text);
}

.sigil {
  color: var(--prompt);
}

.cmd {
  white-space: pre;
}

.cmd.is-typing::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -0.15em;
}

.caret {
  display: inline-block;
  width: 0.5em;
  height: 1.05em;
  margin-left: 0.15em;
  background: var(--accent);
  vertical-align: -0.18em;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero {
  padding-top: clamp(56px, 10vw, 96px);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6.5vw, 58px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--text-bright);
}

.role {
  margin: 0 0 26px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--accent);
}

.lede {
  margin: 0;
  max-width: 72ch;
  font-size: clamp(15px, 1.7vw, 16px);
  line-height: 1.85;
  color: var(--text-muted);
}

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

.btn {
  padding: 12px 22px;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  font-size: 14px;
  color: var(--text-muted);
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}

.quote {
  max-width: 82ch;
  padding-left: 24px;
  border-left: 2px solid var(--border-strong);
}

.quote p {
  margin: 0 0 18px;
  font-size: clamp(14.5px, 1.7vw, 15.5px);
  line-height: 1.9;
  color: var(--text-muted);
}

.quote p:last-child {
  margin-bottom: 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
}

.fact-value {
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--text-bright);
}

.fact-label {
  font-size: 13px;
  color: var(--text-dim);
}

.table-scroll {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
}

.table th,
.table td {
  padding: 13px 14px;
  font-weight: 300;
  vertical-align: top;
}

.table thead th {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.table tbody tr {
  border-top: 1px solid var(--border-soft);
  transition: background 0.2s ease;
}

.table tbody tr:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.table tbody tr:hover {
  background: var(--hover);
}

.table tbody th {
  width: 230px;
  font-weight: 400;
  color: var(--text-bright);
}

.table tbody td {
  font-size: 14px;
  color: var(--text-muted);
}

.hint {
  margin: -12px 0 24px;
  font-size: 13px;
}

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

.log-entry {
  border-top: 1px solid var(--border-soft);
}

.log-entry:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.log-title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  width: calc(100% + 28px);
  margin: 0 -14px;
  padding: 20px 14px;
  background: none;
  border: none;
  border-radius: 2px;
  font: inherit;
  font-size: 14.5px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.log-head:hover {
  background: var(--hover);
}

.hash {
  color: var(--accent);
}

.ref {
  color: var(--prompt);
}

.subject {
  color: var(--text-bright);
}

.when {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-dim);
}

.chevron {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--text-dim);
  border-bottom: 1.5px solid var(--text-dim);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease, border-color 0.2s ease;
}

.log-head:hover .chevron {
  border-color: var(--accent);
}

.log-entry.is-collapsed .chevron {
  transform: rotate(-45deg) translate(-2px, 2px);
}

.log-panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s ease;
}

.log-entry.is-collapsed .log-panel {
  grid-template-rows: 0fr;
}

.log-panel-inner {
  min-height: 0;
  overflow: hidden;
}

.console {
  margin: 4px 0 22px;
  background: var(--bg-console);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  background: var(--bg-chrome);
  border-bottom: 1px solid var(--border);
}

.console-bar .dot {
  width: 8px;
  height: 8px;
}

.console-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.console-body {
  padding: 18px;
  font-size: 13.5px;
  line-height: 1.85;
}

.console-line {
  margin: 0;
  color: var(--text-bright);
}

.console-cmd {
  white-space: pre;
}

.console-out {
  margin: 10px 0 0;
  max-width: 92ch;
  color: var(--text-muted);
  white-space: pre-wrap;
}

.console-end {
  margin: 12px 0 0;
}

.is-typing::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  vertical-align: -0.15em;
  animation: blink 0.9s steps(1) infinite;
}

.contact {
  background: var(--bg-chrome);
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 16px 48px;
}

.contact-grid a {
  font-size: clamp(16px, 2.2vw, 19px);
}

.location {
  margin: 0;
  font-size: 14px;
}

.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  border-top: 1px solid var(--border);
}

.footer p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 720px) {
  .chrome-inner {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .path {
    display: none;
  }

  .nav a {
    padding-block: 10px;
  }

  .theme-toggle {
    padding: 10px 14px;
  }

  .cmd,
  .console-cmd {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .facts li {
    padding: 14px 16px;
  }

  .fact-value {
    font-size: 26px;
  }

  .fact-label {
    font-size: 12px;
  }

  .table-scroll {
    overflow-x: visible;
  }

  .table {
    display: block;
    min-width: 0;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: block;
  }

  .table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 0;
  }

  .table tbody th,
  .table tbody td {
    padding: 0;
  }

  .table tbody th {
    width: auto;
    font-size: 15px;
  }

  .table tbody td {
    grid-column: 1 / -1;
  }

  .table tbody td.dim {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 12.5px;
  }

  .when {
    margin-left: 0;
    width: 100%;
  }

  .chevron {
    position: absolute;
    right: 14px;
    top: 24px;
  }

  .log-head {
    position: relative;
    padding-right: 36px;
  }
}

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

  .caret,
  .is-typing::after {
    animation: none;
  }

  .log-panel {
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
