:root {
  color-scheme: dark;
  --bg: #0a0b0a;
  --bg-2: #130707;
  --ink: #f4eee6;
  --muted: rgba(244, 238, 230, 0.66);
  --faint: rgba(244, 238, 230, 0.42);
  --line: rgba(244, 238, 230, 0.18);
  --line-soft: rgba(244, 238, 230, 0.09);
  --red: #5b1518;
  --red-2: #a43a35;
  --glass: rgba(255, 255, 255, 0.035);
}

body.light {
  color-scheme: light;
  --bg: #f3eee7;
  --bg-2: #efe2d8;
  --ink: #150d0d;
  --muted: rgba(21, 13, 13, 0.62);
  --faint: rgba(21, 13, 13, 0.38);
  --line: rgba(21, 13, 13, 0.18);
  --line-soft: rgba(21, 13, 13, 0.1);
  --glass: rgba(255, 255, 255, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 760ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
  animation-name: theme-fade-out;
}

::view-transition-new(root) {
  animation-name: theme-fade-in;
}

::view-transition-image-pair(root) {
  isolation: isolate;
}

::view-transition-new(root)::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(128, 26, 28, 0.38), rgba(213, 118, 67, 0.26)),
    radial-gradient(circle at 68% 34%, rgba(244, 238, 230, 0.32), transparent 26rem);
  mix-blend-mode: color-dodge;
  animation: transition-flash 760ms steps(8, end) both;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(244, 238, 230, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 238, 230, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 78% 18%, rgba(164, 58, 53, 0.28), transparent 34rem),
    radial-gradient(circle at 18% 88%, rgba(244, 238, 230, 0.06), transparent 26rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  color: var(--ink);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0;
  transition:
    background-color 760ms cubic-bezier(0.22, 1, 0.36, 1),
    color 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(0, 0, 0, 0.965), rgba(0, 0, 0, 0.965)),
    url("assets/odin-manuscript.png") center center / cover no-repeat,
    repeating-radial-gradient(circle at 50% 50%, rgba(244, 238, 230, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28));
  background-blend-mode: normal, luminosity, screen, normal;
  opacity: 1;
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 760ms cubic-bezier(0.22, 1, 0.36, 1);
  filter: blur(8px) saturate(0.78) contrast(0.9);
  transform: scale(1.035);
}

body.light::before {
  mix-blend-mode: multiply;
  opacity: 0.12;
  filter: blur(8px) invert(1) saturate(0.5) contrast(0.8);
}

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

a,
button,
.feature-table article,
.command-row,
.terminal-pane,
.image-pane,
.docs-link,
.site-frame,
.topbar,
.topbar > *,
.command-label,
code,
.terminal-pane pre,
.details,
footer {
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease,
    transform 220ms ease,
    filter 220ms ease,
    box-shadow 220ms ease;
}

button {
  font: inherit;
}

.site-frame {
  width: min(100% - 72px, 1920px);
  margin: 12px auto 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 32rem);
  backdrop-filter: blur(18px);
}

.topbar {
  display: grid;
  grid-template-columns: 340px minmax(520px, 1fr) 120px 170px;
  min-height: 126px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topbar > * {
  border-right: 1px solid var(--line);
}

.topbar > *:last-child {
  border-right: 0;
}

.wordmark {
  display: flex;
  align-items: flex-start;
  padding: 18px 18px 14px;
  font-family: Cinzel, serif;
  font-size: clamp(2.05rem, 3.1vw, 3.35rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.primary-nav,
.version-badge,
.theme-control {
  padding: 20px 18px;
  color: var(--ink);
  font-family: Cinzel, serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
}

.primary-nav > a,
.social-tab {
  display: block;
  padding: 20px 18px;
  border-right: 1px solid var(--line);
}

.primary-nav > a:last-child,
.social-tab {
  border-right: 0;
}

.primary-nav > a:hover,
.social-tab a:hover {
  background: rgba(244, 238, 230, 0.055);
  color: #fff8ee;
}

.glitch-text > span {
  display: inline-block;
}

.primary-nav > a:hover.glitch-text > span,
.social-tab:hover .glitch-text > span {
  animation: nav-text-tear 520ms steps(3, end) infinite;
  filter: drop-shadow(-1px 0 rgba(164, 58, 53, 0.9)) drop-shadow(1px 0 rgba(244, 238, 230, 0.32));
}

.social-tab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.social-tab span {
  margin-right: auto;
}

.social-tab a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  color: var(--faint);
}

.social-tab svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.version-badge {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.theme-control {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}

.theme-control i {
  width: 38px;
  height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
}

.theme-control i::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 2px 3px;
  border-radius: 50%;
  background: var(--ink);
}

body.light .theme-control i::after {
  margin-left: 19px;
}

.hero {
  min-height: 610px;
  padding: 76px 28px 74px;
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.requirement,
.details p {
  margin: 0;
  color: var(--faint);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin: 14px 0 22px;
  font-family: Cinzel, serif;
  font-size: clamp(3rem, 5.8vw, 6.8rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.lede {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.1vw, 1.18rem);
  line-height: 1.58;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 560px);
  align-items: end;
  gap: clamp(36px, 7vw, 110px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.commands {
  width: 100%;
  margin: 0;
  text-align: left;
}

.command-row {
  margin-bottom: 20px;
}

.command-label {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--faint);
  font-family: Cinzel, serif;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.copy-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: lowercase;
  cursor: pointer;
}

.copy-button:hover {
  color: #ffffff;
}

code {
  display: block;
  overflow-x: auto;
  border: 1px solid var(--line);
  padding: 4px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.028);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  white-space: nowrap;
}

.command-row:hover code {
  border-color: rgba(244, 238, 230, 0.36);
  background: rgba(255, 255, 255, 0.05);
}

.command-row:hover .command-label {
  color: var(--ink);
}

.requirement {
  margin-top: 10px;
}

.action-section {
  border-bottom: 1px solid var(--line);
}

.section-title-row,
.features > h2 {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.section-title-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.section-title-row h2,
.features > h2 {
  margin: 0;
  padding: 12px 18px;
  font-family: Cinzel, serif;
  font-size: clamp(1.2rem, 1.55vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.section-title-row p {
  margin: 0;
  padding: 12px 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.action-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  min-height: 500px;
}

.terminal-pane,
.image-pane {
  min-height: 500px;
}

.terminal-pane {
  padding: 40px 18px 18px;
  border-right: 1px solid var(--line);
}

.terminal-pane:hover .terminal-screen {
  border-color: rgba(244, 238, 230, 0.52);
  background: rgba(255, 255, 255, 0.04);
}

.terminal-screen {
  height: 100%;
  min-height: 424px;
  margin: 0;
  border: 1px solid var(--ink);
  padding: 52px 22px 22px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.014)),
    radial-gradient(circle at 15% 18%, rgba(244, 238, 230, 0.055), transparent 22rem);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.terminal-bar {
  position: absolute;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0 0 18px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.terminal-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.85;
}

.terminal-bar b {
  margin-left: 4px;
  font-weight: 500;
}

.terminal-screen p {
  margin: 0;
  color: rgba(244, 238, 230, 0.5);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(0.58rem, 0.72vw, 0.72rem);
  line-height: 1.78;
}

.prompt {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 30px !important;
}

.prompt span {
  color: rgba(244, 238, 230, 0.66);
  font-size: 0.95rem;
  font-weight: 600;
}

.prompt b {
  font-weight: 500;
}

#cursor {
  display: inline-block;
  width: 5px;
  height: 1.2em;
  background: rgba(244, 238, 230, 0.54);
  transform: translateY(0.2em);
  animation: cursor-blink 860ms steps(2, end) infinite;
}

.tool-log {
  display: grid;
  gap: 2px;
  margin-left: 22px;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.tool-log.visible,
.terminal-result.visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-log p {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 60px;
  gap: 18px;
  color: rgba(244, 238, 230, 0.34);
}

.tool-log em {
  font-style: normal;
  font-weight: 400;
}

.tool-log span {
  font-weight: 500;
}

.tool-log time {
  color: rgba(244, 238, 230, 0.42);
  text-align: right;
}

.terminal-result {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.terminal-result p {
  color: rgba(244, 238, 230, 0.48);
}

.terminal-result strong {
  display: inline-block;
  width: 24px;
  color: rgba(244, 238, 230, 0.62);
  font-weight: 600;
}

.terminal-result .saved {
  margin-top: 24px;
}

.terminal-result b {
  color: rgba(244, 238, 230, 0.68);
  font-weight: 600;
}

.image-pane {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  --mx: 50%;
  --my: 50%;
  --dx: 0;
  --dy: 0;
  background:
    linear-gradient(rgba(10, 11, 10, 0.2), rgba(10, 11, 10, 0.72)),
    radial-gradient(ellipse at 62% 52%, rgba(164, 58, 53, 0.72), transparent 42%),
    linear-gradient(135deg, rgba(244, 238, 230, 0.08), transparent 34%),
    repeating-linear-gradient(112deg, transparent 0 16px, rgba(244, 238, 230, 0.032) 16px 17px);
}

.image-pane,
.image-pane * {
  user-select: none;
  -webkit-user-drag: none;
}

.image-pane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(34%) sepia(28%) hue-rotate(315deg) saturate(72%) brightness(0.34) contrast(1.05);
  opacity: 0.42;
  transform: none;
  pointer-events: none;
}

.image-pane::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 11, 10, 0.04), rgba(10, 11, 10, 0.42)),
    radial-gradient(circle at 48% 40%, transparent 0 26%, rgba(10, 11, 10, 0.68) 100%),
    repeating-linear-gradient(0deg, rgba(244, 238, 230, 0.04) 0 1px, transparent 1px 4px);
  opacity: 0.94;
  pointer-events: none;
}

.image-pane::after {
  content: "";
  position: absolute;
  inset: -5%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(244, 238, 230, 0.08), transparent 0.8rem),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(244, 238, 230, 0.035) 18px 19px, transparent 19px 33px),
    url("assets/odin-manuscript.png");
  background-size: auto, auto, cover;
  background-position: center;
  filter: grayscale(28%) sepia(30%) hue-rotate(315deg) saturate(90%) brightness(0.52) contrast(1.05) blur(0.45px);
  mix-blend-mode: lighten;
  clip-path: polygon(
    0 calc(var(--my) - 16%),
    100% calc(var(--my) - 21%),
    100% calc(var(--my) + 18%),
    0 calc(var(--my) + 12%)
  );
  transform: translate(-8px, 2px) skewX(-0.45deg);
}

.image-pane:hover img {
  opacity: 0.48;
  filter: grayscale(28%) sepia(28%) hue-rotate(315deg) saturate(82%) brightness(0.39) contrast(1.08) blur(0.25px);
  transform: translate(calc(var(--dx) * -0.05px), calc(var(--dy) * -0.035px));
}

.image-pane:hover {
  border-color: rgba(244, 238, 230, 0.44);
}

.image-pane:hover::after {
  opacity: 0.34;
  animation: pointer-wave 560ms steps(4, end) infinite;
}

.image-pane span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: var(--ink);
  font-family: Cinzel, serif;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.feature-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-table article {
  min-height: 112px;
  padding: 20px 18px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-table article:nth-child(3n) {
  border-right: 0;
}

.feature-table article:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(244, 238, 230, 0.34);
  transform: none;
}

.feature-table article:hover h3 {
  color: #fff8ee;
}

.feature-table h3 {
  margin-bottom: 6px;
  font-family: Cinzel, serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.feature-table p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.56;
}

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

.details h2 {
  margin: 8px 0 0;
  font-family: Cinzel, serif;
  font-size: clamp(1.65rem, 3vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.details a {
  border: 1px solid var(--line);
  padding: 9px 13px;
  font-family: Cinzel, serif;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 22px 18px 34px;
  color: var(--faint);
  font-family: Cinzel, serif;
  font-size: 0.84rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

@keyframes pointer-wave {
  0% {
    transform: translate(calc(var(--dx) * 0.18px), calc(var(--dy) * 0.08px)) skewX(calc(var(--dx) * 0.01deg));
    filter: grayscale(28%) sepia(30%) hue-rotate(315deg) saturate(90%) brightness(0.52) contrast(1.05) blur(0.45px);
  }
  25% {
    transform: translate(calc(var(--dx) * 0.34px - 8px), calc(var(--dy) * 0.12px + 2px)) skewX(calc(var(--dx) * 0.018deg));
    filter: grayscale(30%) sepia(34%) hue-rotate(315deg) saturate(105%) brightness(0.58) contrast(1.12) blur(0.75px);
  }
  50% {
    transform: translate(calc(var(--dx) * -0.14px + 6px), calc(var(--dy) * 0.18px - 1px)) skewX(calc(var(--dx) * -0.012deg));
    filter: grayscale(24%) sepia(30%) hue-rotate(315deg) saturate(100%) brightness(0.56) contrast(1.1) blur(0.4px);
  }
  75% {
    transform: translate(calc(var(--dx) * 0.28px + 2px), calc(var(--dy) * -0.08px)) skewX(calc(var(--dx) * 0.014deg));
    filter: grayscale(32%) sepia(36%) hue-rotate(315deg) saturate(95%) brightness(0.5) contrast(1.15) blur(0.9px);
  }
  100% {
    transform: translate(calc(var(--dx) * 0.18px), calc(var(--dy) * 0.08px)) skewX(calc(var(--dx) * 0.01deg));
    filter: grayscale(28%) sepia(30%) hue-rotate(315deg) saturate(90%) brightness(0.52) contrast(1.05) blur(0.45px);
  }
}

@keyframes nav-text-tear {
  0% {
    transform: translate(0, 0) skewX(0deg);
    clip-path: inset(0 0 0 0);
  }
  22% {
    transform: translate(-1px, 0) skewX(-4deg);
    clip-path: polygon(0 0, 100% 0, 100% 42%, 0 55%);
  }
  44% {
    transform: translate(1px, 0) skewX(3deg);
    clip-path: polygon(0 24%, 100% 14%, 100% 100%, 0 100%);
  }
  66% {
    transform: translate(-1px, 0) skewX(-2deg);
    clip-path: polygon(0 0, 100% 8%, 100% 70%, 0 58%);
  }
  100% {
    transform: translate(0, 0) skewX(0deg);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes cursor-blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes theme-fade-out {
  from {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 0;
    filter: blur(6px);
  }
}

@keyframes theme-fade-in {
  from {
    opacity: 0;
    filter: blur(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes transition-flash {
  0%,
  18%,
  100% {
    opacity: 0;
    filter: hue-rotate(0deg);
  }
  36% {
    opacity: 0.82;
    filter: hue-rotate(-18deg);
  }
  44% {
    opacity: 0.18;
    filter: hue-rotate(34deg);
  }
  52% {
    opacity: 0.58;
    filter: hue-rotate(-42deg);
  }
  60% {
    opacity: 0;
    filter: hue-rotate(0deg);
  }
}

@media (max-width: 980px) {
  .site-frame {
    width: min(100% - 24px, 1920px);
  }

  .topbar {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .theme-control,
  .version-badge {
    display: none;
  }

  .primary-nav {
    border-top: 1px solid var(--line);
  }

  .wordmark {
    font-size: 2rem;
  }

  .action-grid,
  .section-title-row,
  .feature-table {
    grid-template-columns: 1fr;
  }

  .section-title-row p {
    border-left: 0;
  }

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

  .terminal-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .terminal-screen {
    padding: 58px 20px 22px;
  }

  .tool-log p {
    grid-template-columns: 1fr 52px;
  }

  .tool-log span {
    grid-column: 1 / -1;
  }

  .feature-table article,
  .feature-table article:nth-child(3n) {
    border-right: 0;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .wordmark {
    border-bottom: 1px solid var(--line);
  }

  .primary-nav {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 590px;
    padding: 58px 14px;
  }

  h1 {
    font-size: clamp(2.2rem, 12vw, 4.2rem);
  }

  .lede {
    font-size: 1rem;
  }

  .action-section h2,
  .features > h2 {
    padding-left: 14px;
  }

  .terminal-pane {
    padding: 36px 14px 14px;
  }

  .image-pane {
    min-height: 360px;
  }

  .details,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
