:root {
  --paper: #fffef8;
  --ink: #0d0d0d;
  --muted: #5d5d5d;
  --line: #0d0d0d;
  --green: #10a37f;
  --soft: #e3f6ef;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(16, 20, 14, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(16, 20, 14, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: clamp(1rem, 2vw, 1.5rem);
  padding: 0.72rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 248, 0.9);
  box-shadow: 6px 6px 0 var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 1000;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.nav {
  display: flex;
  gap: 0.55rem;
}

.nav a {
  display: grid;
  place-items: center;
  min-width: 76px;
  height: 42px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.nav a:hover {
  background: var(--green);
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(330px, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5.5rem);
  padding: clamp(1rem, 4vw, 4.5rem);
  padding-bottom: 2rem;
}

.copy {
  max-width: 640px;
  z-index: 2;
}

.kicker {
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 1000;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 4px 4px 0 var(--line);
}

h1 {
  display: flex;
  gap: clamp(0.25rem, 1.2vw, 0.8rem);
  margin: 0;
  color: var(--ink);
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 1000;
  line-height: 0.78;
  letter-spacing: 0;
}

h1 span {
  display: inline-block;
  user-select: none;
  min-width: 0.68em;
  text-align: center;
  border: 3px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 10px 10px 0 var(--green), 16px 16px 0 var(--line);
  transform-origin: bottom center;
  animation: letter-hop 1.45s cubic-bezier(0.18, 0.92, 0.22, 1) infinite;
}

h1 span:nth-child(2) {
  animation-delay: 0.16s;
}

h1 span:nth-child(3) {
  animation-delay: 0.32s;
}

.bio {
  max-width: 560px;
  margin: 1.6rem 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  font-weight: 700;
  line-height: 1.28;
}

.copy p:last-child {
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.65;
}

.poster {
  position: relative;
  justify-self: center;
  width: min(42vw, 520px);
  min-width: 320px;
  aspect-ratio: 1;
  border: 3px solid var(--line);
  border-radius: 42px;
  background: #ffffff;
  box-shadow: 16px 16px 0 var(--green), 28px 28px 0 var(--line);
  transform: rotate(2deg);
  animation: poster-in 1.2s cubic-bezier(0.1, 0.85, 0.2, 1) both, float 3.4s ease-in-out 1.2s infinite;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
  display: block;
}

.stamp {
  position: absolute;
  left: -1.1rem;
  top: 1.2rem;
  z-index: 2;
  padding: 0.72rem 1.05rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--green);
  font-size: clamp(1rem, 2vw, 1.7rem);
  font-weight: 1000;
  box-shadow: 5px 5px 0 var(--line);
  transform: rotate(-8deg);
}

.ticker-wrap {
  position: relative;
  border-top: 3px solid var(--line);
  border-bottom: 3px solid var(--line);
  background: var(--soft);
  overflow: hidden;
}

.ticker-title {
  position: absolute;
  left: 1.2rem;
  top: -1px;
  z-index: 3;
  padding: 0.56rem 0.85rem;
  border: 2px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--green);
  font-size: 0.75rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 1rem;
  padding: 1.15rem 1rem 1rem;
  animation: gallery-move 34s linear infinite;
}

.strip {
  display: flex;
  gap: 1rem;
}

.strip img {
  width: clamp(118px, 13vw, 188px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--line);
}

.chart-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(360px, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  min-height: 100vh;
  padding: clamp(1.2rem, 4vw, 4rem);
  align-items: center;
  background: #ffffff;
}

.chart-copy {
  max-width: 430px;
}

.chart-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 7.5rem);
  font-weight: 1000;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 6px 6px 0 var(--green);
}

.chart-copy p:last-child {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  line-height: 1.6;
}

.chart-frame {
  width: 100%;
  min-height: min(72vh, 760px);
  border: 3px solid var(--line);
  border-radius: 34px;
  background: var(--soft);
  box-shadow: 14px 14px 0 var(--green), 24px 24px 0 var(--line);
  overflow: hidden;
}

.chart-frame iframe {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  min-height: 560px;
  border: 0;
  background: #ffffff;
}

@keyframes letter-hop {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  36% {
    transform: translateY(-0.18em) rotate(-3deg);
  }
  58% {
    transform: translateY(0.03em) rotate(2deg);
  }
}

@keyframes poster-in {
  0% {
    opacity: 0;
    transform: translateX(55vw) rotate(10deg) scale(0.86);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(2deg) scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(2deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1deg);
  }
}

@keyframes gallery-move {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    border-radius: 26px;
    box-shadow: 4px 4px 0 var(--line);
  }

  .nav a {
    min-width: 62px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem 1rem 2rem;
  }

  h1 {
    font-size: clamp(4.5rem, 27vw, 8rem);
  }

  h1 span {
    border-radius: 20px;
    box-shadow: 6px 6px 0 var(--green), 10px 10px 0 var(--line);
  }

  .poster {
    width: min(82vw, 420px);
    min-width: 0;
    border-radius: 30px;
    box-shadow: 8px 8px 0 var(--green), 15px 15px 0 var(--line);
  }

  .poster img {
    border-radius: 26px;
  }

  .ticker-track {
    animation-duration: 24s;
  }

  .chart-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2rem 1rem 3rem;
  }

  .chart-frame {
    min-height: 560px;
    border-radius: 24px;
    box-shadow: 8px 8px 0 var(--green), 14px 14px 0 var(--line);
  }

  .chart-frame iframe {
    height: 560px;
  }
}

img { -webkit-user-drag: none; user-select: none; -webkit-tap-highlight-color: transparent; }

.word-strip span {
  display: inline-flex;
  align-items: center;
  height: clamp(118px, 13vw, 188px);
  padding: 0 1.4rem;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--line);
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  font-weight: 1000;
  white-space: nowrap;
}
.word-strip span:nth-child(even) { background: var(--green); }
.word-strip img {
  width: clamp(118px, 13vw, 188px);
  aspect-ratio: 1;
  object-fit: contain;
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 5px 5px 0 var(--line);
}

[hidden] { display: none !important; }
h1 span { padding: 0 0.05em; }


/* ChatGPT palette on FEG frame */
.topbar { backdrop-filter: blur(12px); }
h1 { font-size: clamp(4.2rem, 13vw, 12rem); }
h1 span { flex: none; padding: 0 0.08em; }
@media (max-width: 820px) { h1 { font-size: clamp(4.2rem, 24vw, 7.5rem); } }
.chart-frame { position: relative; display: grid; place-items: center; background: #f8f8f8; }
.chart-frame iframe { position: absolute; inset: 0; height: 100%; }
.chart-wait { display: flex; align-items: center; gap: .7rem; padding: 2rem 3.5rem; background: #fff; color: #777; font-size: 1.05rem; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.spin { width: 18px; height: 18px; border: 2px solid #ccc; border-top-color: #777; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
