:root {
  color-scheme: dark;
  --bg: #070a09;
  --panel: rgba(12, 17, 14, 0.88);
  --ink: #e4eee8;
  --muted: #829088;
  --soft: #aab8b0;
  --line: rgba(190, 211, 199, 0.23);
  --green: #72d49a;
  --green-bright: #9be7b8;
  --glow: rgba(114, 212, 154, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", "Cascadia Mono", "Courier New", monospace;
  line-height: 1.65;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.021) 50%, transparent 50%) 0 0 / 100% 5px,
    radial-gradient(circle at 17% 18%, rgba(114, 212, 154, 0.075), transparent 30rem),
    radial-gradient(circle at 85% 82%, rgba(180, 205, 190, 0.04), transparent 34rem),
    var(--bg);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: repeating-linear-gradient(
    91deg,
    transparent 0,
    transparent 47px,
    rgba(255, 255, 255, 0.012) 48px
  );
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem) 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.terminal-name {
  color: var(--ink);
  font-weight: 700;
}

.terminal-mode {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.terminal-mode i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.25rem var(--glow), 0 0 1rem var(--green);
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(380px, 1.14fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  min-height: min(760px, calc(100vh - 9rem));
  padding: clamp(3rem, 8vw, 7rem) 0;
}

.monk-portrait {
  min-width: 0;
  margin: 0;
}

.image-field {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  place-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 3.5rem 100%,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 3.5rem,
    rgba(6, 10, 8, 0.42);
  box-shadow:
    0 1.5rem 4rem rgba(0, 0, 0, 0.38),
    0 0 4rem rgba(114, 212, 154, 0.045) inset;
}

.image-field::before,
.image-field::after {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-color: var(--green);
  content: "";
  opacity: 0.8;
}

.image-field::before {
  top: 0.7rem;
  left: 0.7rem;
  border-top: 1px solid;
  border-left: 1px solid;
}

.image-field::after {
  right: 0.7rem;
  bottom: 0.7rem;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.image-field img {
  z-index: 1;
  display: block;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 0.5rem rgba(228, 238, 232, 0.16))
    drop-shadow(0 0 1.75rem rgba(114, 212, 154, 0.11));
}

.monk-portrait figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-copy {
  position: relative;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0 0 2rem;
  color: var(--ink);
  font-size: clamp(2rem, 5.2vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

h1 span {
  color: var(--soft);
}

.introduction,
.teaching,
.invitation {
  max-width: 42rem;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: clamp(1.03rem, 1.8vw, 1.18rem);
}

.introduction {
  margin: 0;
  color: var(--ink);
}

.introduction strong {
  color: var(--green-bright);
  font-weight: 600;
}

.teaching {
  position: relative;
  margin: 2rem 0;
  padding: 1.35rem 1.5rem 1.35rem 1.75rem;
  border-left: 2px solid var(--green);
  background: linear-gradient(90deg, rgba(114, 212, 154, 0.08), transparent);
  color: var(--soft);
}

.teaching p,
.invitation {
  margin: 0;
}

.invitation {
  color: var(--muted);
}

.terminal-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 22rem);
  margin-top: 2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--green);
  background: rgba(114, 212, 154, 0.07);
  color: var(--green-bright);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.terminal-link:hover,
.terminal-link:focus-visible {
  background: var(--green);
  color: #07100a;
  box-shadow: 0 0 2rem var(--glow);
  outline: none;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

footer p {
  margin: 0;
}

.footer-note {
  max-width: 26rem;
  color: var(--soft);
  text-align: right;
}

@media (max-width: 780px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 3rem 0 4rem;
  }

  .monk-portrait {
    width: min(100%, 28rem);
    margin: 0 auto;
  }

  .image-field {
    aspect-ratio: 5 / 4;
  }

  .image-field img {
    width: 78%;
    height: 115%;
  }

  footer {
    flex-direction: column;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 460px) {
  .page-shell {
    width: min(100% - 1.25rem, 1120px);
  }

  .terminal-mode {
    font-size: 0;
  }

  .terminal-mode::after {
    font-size: 0.68rem;
    content: "WEB";
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .teaching {
    padding-right: 0.65rem;
    padding-left: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-link {
    transition: none;
  }
}
