:root {
  --tb-ink: #17353a;
  --tb-accent: #b56a2d;
  --tb-border: rgba(23, 53, 58, 0.12);
}

[data-md-color-scheme="default"] {
  --md-primary-fg-color: #17353a;
  --md-primary-fg-color--light: #2c565c;
  --md-primary-fg-color--dark: #0f2629;
  --md-accent-fg-color: #b56a2d;
  --md-default-bg-color: #f7f3ea;
  --md-typeset-a-color: #96501d;
}

[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #8ca4a8;
  --md-accent-fg-color: #ffc27d;
  --md-default-bg-color: #0f1719;
  --md-default-fg-color: rgba(255, 255, 255, 0.88);
  --md-typeset-a-color: #ffc27d;
}

.tb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.9fr);
  gap: 1.6rem;
  align-items: center;
  padding: 2.2rem;
  border: 1px solid var(--tb-border);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.06), transparent 18%),
    radial-gradient(circle at top right, rgba(181, 106, 45, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(23, 53, 58, 0.98), rgba(34, 72, 78, 0.92));
  color: #f7f3ea;
  box-shadow: 0 20px 45px rgba(23, 53, 58, 0.16);
  overflow: hidden;
  position: relative;
}

.tb-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 125, 0.2), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.tb-hero__copy {
  position: relative;
  z-index: 1;
}

.tb-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.72);
}

.tb-typewriter {
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.35rem, 3.3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.03em;
}

.tb-typewriter__text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.tb-typewriter__caret {
  width: 0.08em;
  height: 1em;
  background: #ffc27d;
  box-shadow: 0 0 18px rgba(255, 194, 125, 0.55);
  animation: tb-caret-blink 0.9s steps(1, end) infinite;
}

.tb-hero__lead {
  margin-top: 1rem;
  max-width: 48rem;
  color: rgba(247, 243, 234, 0.88);
}

.tb-hero p {
  margin-top: 1rem;
  max-width: 48rem;
  color: rgba(247, 243, 234, 0.88);
}

.tb-hero-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.35rem;
  width: 100%;
  max-width: 42rem;
}

.tb-hero-actions .md-button {
  border-radius: 999px;
  margin: 0;
  flex: 0 0 auto;
}

.tb-hero-actions .md-button--primary {
  background: linear-gradient(90deg, #ffc27d, #f7a45d);
  color: #17353a;
  border-color: transparent;
}

.tb-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.tb-hero-meta span {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 243, 234, 0.18);
  background: rgba(247, 243, 234, 0.08);
  font-size: 0.88rem;
}

.tb-hero__art {
  position: relative;
  min-height: 21rem;
  z-index: 1;
  margin-top: 6rem;
}

.tb-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(247, 243, 234, 0.16);
  backdrop-filter: blur(2px);
}

.tb-orbit--a {
  inset: 1.2rem 0 4.8rem 4rem;
  animation: tb-float-a 10s ease-in-out infinite;
}

.tb-orbit--b {
  inset: 3.8rem 2.4rem 2rem 1.6rem;
  border-style: dashed;
  animation: tb-float-b 13s ease-in-out infinite;
}

.tb-orbit--c {
  inset: 6.8rem 4.4rem 4rem 4.4rem;
  border-color: rgba(255, 194, 125, 0.2);
  animation: tb-spin 24s linear infinite;
}

.tb-signal,
.tb-panel {
  position: absolute;
  border: 1px solid rgba(247, 243, 234, 0.12);
  border-radius: 1rem;
  background: rgba(247, 243, 234, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(8, 17, 18, 0.14);
}

.tb-signal {
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.3rem;
  padding: 1.2rem 1.35rem;
  min-width: 14rem;
  text-align: center;
}

.tb-signal strong {
  font-size: 1.04rem;
  color: #fff;
}

.tb-signal__label,
.tb-panel__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 243, 234, 0.66);
}

.tb-panel {
  display: grid;
  gap: 0.22rem;
  padding: 0.95rem 1rem;
}

.tb-panel strong {
  color: #fff;
  font-size: 0.98rem;
}

.tb-panel small {
  color: rgba(247, 243, 234, 0.7);
}

.tb-panel--top {
  top: 1.2rem;
  right: 0.2rem;
  animation: tb-float-a 8s ease-in-out infinite;
}

.tb-panel--bottom {
  bottom: 1.3rem;
  left: 0.2rem;
  animation: tb-float-b 11s ease-in-out infinite;
}

.tb-section-head {
  margin: 2.8rem 0 1.2rem;
}

.tb-section-head__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--tb-accent);
}

.tb-section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.tb-section-head p {
  max-width: 42rem;
  margin-top: 0.55rem;
}

.tb-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.2rem;
  grid-auto-flow: row;
}

.tb-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 15rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid var(--tb-border);
  background: rgba(255, 255, 255, 0.56);
  color: inherit;
  box-shadow: 0 16px 40px rgba(23, 53, 58, 0.08);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tb-tile::before {
  content: "";
  position: absolute;
  inset: auto auto -18% -10%;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 125, 0.22), transparent 68%);
  pointer-events: none;
}

.tb-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08), transparent 30%);
  pointer-events: none;
}

.tb-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(23, 53, 58, 0.12);
  border-color: rgba(181, 106, 45, 0.22);
}

.tb-tile h3,
.tb-tile p,
.tb-tile strong,
.tb-tile span,
.tb-tile small {
  position: relative;
  z-index: 1;
}

.tb-tile h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.22;
}

.tb-tile p {
  margin: 0;
  color: rgba(23, 53, 58, 0.82);
}

.tb-tile__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(23, 53, 58, 0.62);
}

.tb-tile__chips,
.tb-tile__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.tb-tile__chips span,
.tb-tile__metrics span {
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 53, 58, 0.11);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
}

.tb-tile__footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.8rem;
  margin-top: auto;
}

.tb-tile__footer strong {
  font-size: 0.95rem;
}

.tb-tile__footer span {
  font-size: 0.76rem;
  color: rgba(23, 53, 58, 0.58);
  text-align: right;
}

.tb-tile--intro {
  grid-column: span 5;
  background:
    radial-gradient(circle at top right, rgba(255, 194, 125, 0.25), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(240, 247, 246, 0.92));
}

.tb-tile--catalog {
  grid-column: span 3;
  background:
    radial-gradient(circle at 75% 16%, rgba(120, 169, 173, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(236, 246, 247, 0.96), rgba(225, 239, 240, 0.9));
}

.tb-tile--math {
  grid-column: span 4;
  background:
    linear-gradient(135deg, rgba(255, 244, 225, 0.92), rgba(255, 238, 214, 0.9));
}

.tb-tile--tech {
  grid-column: span 4;
  background:
    radial-gradient(circle at 80% 20%, rgba(129, 221, 208, 0.18), transparent 22%),
    linear-gradient(135deg, rgba(230, 248, 246, 0.96), rgba(221, 236, 240, 0.92));
}

.tb-tile--practice {
  grid-column: span 3;
  background:
    linear-gradient(135deg, rgba(241, 243, 255, 0.94), rgba(231, 236, 255, 0.92));
}

.tb-tile--experience {
  grid-column: span 5;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 194, 125, 0.2), transparent 22%),
    linear-gradient(135deg, rgba(255, 246, 239, 0.94), rgba(250, 238, 229, 0.92));
}

.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  border-radius: 1rem;
  border: 1px solid var(--tb-border);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 12px 30px rgba(23, 53, 58, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ol > li {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-md-color-scheme="slate"] .tb-tile {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

[data-md-color-scheme="slate"] .tb-tile p,
[data-md-color-scheme="slate"] .tb-tile__footer span,
[data-md-color-scheme="slate"] .tb-tile__eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

[data-md-color-scheme="slate"] .tb-tile__chips span,
[data-md-color-scheme="slate"] .tb-tile__metrics span {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  letter-spacing: -0.02em;
}

.md-typeset table:not([class]) {
  border-radius: 0.9rem;
  overflow: hidden;
}

@keyframes tb-caret-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes tb-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes tb-float-a {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes tb-float-b {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(10px);
  }
}

@media screen and (max-width: 76.2344em) {
  .tb-hero {
    padding: 1.5rem;
  }
}

@media screen and (max-width: 60em) {
  .tb-hero {
    grid-template-columns: 1fr;
  }

  .tb-hero__art {
    min-height: 17rem;
    margin-top: 10rem;
  }

  .tb-hero-actions {
    max-width: none;
  }

  .tb-mosaic {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tb-tile--intro,
  .tb-tile--catalog,
  .tb-tile--math,
  .tb-tile--tech,
  .tb-tile--experience {
    grid-column: span 6;
  }

  .tb-tile--practice {
    grid-column: span 6;
  }
}

@media screen and (max-width: 44em) {
  .tb-typewriter {
    font-size: clamp(1.15rem, 7vw, 1.65rem);
  }

  .tb-hero {
    padding: 1.25rem;
  }

  .tb-hero__art {
    min-height: 14rem;
    margin-top: 1rem;
  }

  .tb-signal {
    min-width: 11.5rem;
    padding: 1rem;
  }

  .tb-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tb-hero-actions .md-button {
    width: 100%;
    text-align: center;
  }

  .tb-mosaic {
    grid-template-columns: 1fr;
  }

  .tb-tile,
  .tb-tile--intro,
  .tb-tile--catalog,
  .tb-tile--math,
  .tb-tile--tech,
  .tb-tile--practice,
  .tb-tile--experience {
    grid-column: span 1;
  }

  .tb-tile__footer {
    align-items: start;
    flex-direction: column;
  }

  .tb-tile__footer span {
    text-align: left;
  }
}
