/* page wrapper and tokens */
.tim-page { 
  --tim-text:#000000; 
  --tim-muted:#333333; 
  --tim-border:rgba(0,0,0,.10);

  --tim-brand:#8a63ff; 
  --tim-accent:#00d1ff;

  --rainbow: linear-gradient(90deg,
    #ff0040, #ff8a00, #ffe600, #31d843,
    #1ecde1, #7b61ff, #ff2bd6, #ff0040);

  --rb-fill: rgba(255,255,255,.86);
  --rb-speed: 18s;

  max-width: 1100px; 
  margin: 32px auto; 
  padding: 0 20px; 
}

/* Center below hero */
.tim-page > *:not(.tim-hero) { text-align: center; }

.tim-section-head { 
  display:flex; 
  align-items:center; 
  gap:10px; 
  margin:10px 0 1px; 
  justify-content: center; 
}
.tim-star { color: var(--tim-accent); }

/* rainbow border */
:where(.tim-hero,.tim-card,.tim-kpi,.tim-cta){
  background:
    linear-gradient(0deg,var(--rb-fill),var(--rb-fill)) padding-box,
    var(--rainbow) border-box;
  background-size: 100% 100%, 400% 400%;
  border: 2px solid transparent;
  animation: rainbow-bg var(--rb-speed) linear infinite;

  color: var(--tim-text);
}

/* hero */
.tim-hero {
  display:grid; 
  grid-template-columns:180px 1fr; 
  gap:22px; 
  align-items:center;

  border-radius: 18px; 
  padding: 22px;

  box-shadow: 0 10px 30px rgba(0,0,0,.12);

  --rb-fill: rgba(255,255,255,.90);
  --rb-speed: 22s;
}

.tim-title { margin: .1rem 0 .4rem 0; font-size: 2.1rem; }

.tim-pfp { 
  width:180px; 
  height:180px; 
  border-radius:50%; 
  object-fit:cover; 
  border:3px solid var(--tim-brand); 
  box-shadow: 0 0 0 6px rgba(138,99,255,.25); 
}

.tim-badgebar { 
  display:flex; 
  flex-wrap:wrap; 
  gap:10px; 
  margin-top:6px; 
}

.tim-badge { 
  font-size:.86rem; 
  background: rgba(255,255,255,.75); 
  border: 1px solid var(--tim-border); 
  padding: 6px 10px; 
  border-radius: 999px; 
  color: var(--tim-text); 
}

/* cards / kpi / cta */
.tim-card { 
  border-radius: 16px; 
  padding: 16px; 
  box-shadow: 0 10px 30px rgba(0,0,0,.10); 

  /* cards slightly lighter + slower motion */
  --rb-fill: rgba(255,255,255,.88);
  --rb-speed: 20s;

  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.tim-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  filter: saturate(1.05);
}
.tim-card h3 { margin: 0 0 .35rem 0; }

.tim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* KPI cards */
.tim-kpi { 
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  justify-content:center; 

  min-width:110px; 
  padding:12px; 
  border-radius:14px; 
  text-align:center;

  box-shadow: 0 10px 24px rgba(0,0,0,.08);

  --rb-fill: rgba(255,255,255,.90);
  --rb-speed: 24s;

  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.tim-kpi:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.12);
  filter: saturate(1.05);
}
.tim-kpi b { font-size: 1.15rem; }

.tim-cta-link { 
  color: var(--tim-text); 
  text-decoration: underline; 
  font-weight: 900; 
}

/* media embed*/
.tim-embed { 
  position:relative; 
  padding-top:56.25%; 
  border-radius:16px; 
  overflow:hidden;

  border: 1px solid rgba(0,0,0,.12);
  background:#000; 
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
}
.tim-embed iframe { 
  position:absolute; 
  inset:0; 
  width:100%; 
  height:100%; 
  border:0; 
}

/*pills */
.tim-pill { 
  display:inline-block; 
  margin: 6px 6px 0 0; 
  padding: 6px 10px; 
  border-radius: 999px; 
  background: rgba(255,255,255,.78); 
  border: 1px solid var(--tim-border); 
  color: var(--tim-text); 
}

/* TCU CARD */
.tcu-card{
  position: relative;
  width: min(980px, 92%);
  margin: 28px auto;
  padding: 26px 22px;
  border-radius: 26px;
  overflow: hidden;

  box-shadow: 0 18px 50px rgba(0,0,0,.12);

  /* shop-style border engine */
  --rb-fill: rgba(255,255,255,.90);
  --rb-speed: 18s;

  background:
    linear-gradient(0deg,var(--rb-fill),var(--rb-fill)) padding-box,
    var(--rainbow) border-box;
  background-size: 100% 100%, 400% 400%;
  border: 2px solid transparent;
  animation: rainbow-bg var(--rb-speed) linear infinite;
}

/* subtle glow */
.tcu-card::after{
  content:"";
  position:absolute;
  inset: -40px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.12), transparent 60%);
  z-index: 0;
  pointer-events:none;
}

.tcu-card > *{ position:relative; z-index:1; }

.tcu-card h2{
  margin: 0 0 .6rem;
  font-weight: 1000;
  letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}

.tcu-card p{
  max-width: 78ch;
  margin: 0 auto 2rem;
  line-height: 1.65;
  opacity: .92;
}
/* KEYFRAMES */
@keyframes rainbow-bg{
  0%   { background-position: 0% 50%, 0% 50%; }
  100% { background-position: 0% 50%, 100% 50%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .tim-hero, .tim-card, .tim-kpi, .tim-cta, .tcu-card, .tcu-rule, .tcu-badge { 
    animation: none !important; 
    background-position: 0 50%, 0 50%; 
  }
}