/* ==========================================================================
       CSS RESET & DESIGN TOKENS
       ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-white: #f5f1e8;
  /* --bg-parchment: #FAF9F7; */
  --bg-parchment: #fffdf0;
  --text-dark: #0a0a0a;
  --text-heading: #111827;
  --text-body: rgba(0, 0, 0, 0.8);
  --text-muted: #6b7280;
  --color-blue: #0844E2;
  --border-gray: #e5e7eb;
  --border-subtle: rgba(0, 0, 0, 0.1);

  --font-serif: 'Newsreader', 'Iowan', 'IowanOldSt BT', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'GeistMono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #f8fafc;
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

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

/* ==========================================================================
       LAYOUT SYSTEM
       ========================================================================== */
.main-section {
  width: 100%;
  max-width: 1540px;
  position: relative;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.split-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 2rem;
}

@media (min-width: 900px) and (max-width: 1199px) {
  .split-layout-grid {
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .split-layout-grid {
    grid-template-columns: 6rem minmax(0, 820px) minmax(0, 1fr);
    column-gap: 1.5rem;
  }
}

.left-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ==========================================================================
   ACADEMIES STICKY SIDE PANEL (MATCHING SERVICES.PHP / TWO HANDS STUDIO)
   ========================================================================== */
.academies-nav {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 1.15rem;
  position: sticky;
  top: 8.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid #e2e8f0;
  width: 11rem;
  flex-shrink: 0;
  z-index: 30;
  font-family: var(--font-sans);
}

.academies-nav-indicator {
  position: absolute;
  left: -2px;
  top: 0;
  width: 2px;
  height: 24px;
  background: #0f172a;
  border-radius: 1px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.2s ease;
}

.academies-nav a {
  color: rgba(15, 23, 42, 0.45);
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.25s ease, transform 0.25s ease;
  line-height: 1.35;
  display: block;
}

.academies-nav a:hover {
  color: #0f172a;
  transform: translateX(4px);
}

.academies-nav a.is-active {
  color: #0f172a;
  font-weight: 600;
  transform: translateX(4px);
}

@media (max-width: 899px) {
  .academies-nav {
    position: sticky;
    top: 64px;
    z-index: 50;
    background: rgba(245, 241, 232, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 1rem;
    margin-inline: -1rem;
    padding-inline: 1rem;
    border-left: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    gap: 0.75rem;
    width: calc(100% + 2rem);
    max-width: 100vw;
  }

  .academies-nav::-webkit-scrollbar {
    display: none;
  }

  .academies-nav-indicator {
    display: none;
  }

  .academies-nav a {
    white-space: nowrap;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    font-size: 0.925rem;
    color: rgba(15, 23, 42, 0.65);
  }

  .academies-nav a:hover {
    transform: none;
    color: #0f172a;
  }

  .academies-nav a.is-active {
    background: #0f172a;
    color: #ffffff;
    transform: none;
  }
}

@media (max-width: 480px) {
  .academies-nav {
    top: 60px;
    padding: 8px 0.75rem;
    margin-inline: -0.75rem;
    padding-inline: 0.75rem;
    width: calc(100% + 1.5rem);
    gap: 0.5rem;
  }

  .academies-nav a {
    padding: 5px 13px;
    font-size: 0.85rem;
  }
}


/* ==========================================================================
       PARCHMENT / LETTERHEAD SECTION
       ========================================================================== */
.parchment-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 3rem;
  padding-bottom: 5rem;
  font-family: var(--font-serif);
  color: var(--text-dark);
}

/* @media (min-width: 768px) {
  .parchment-section {
    padding-top: 6rem;
  }
} */

.parchment-backdrop {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 3rem;
  bottom: 1rem;
  overflow: hidden;
  background-color: #ffff;
  box-shadow: 0 0.5px 1px 0 rgba(0, 0, 0, 0.20), 0 2px 3px 0 rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  .parchment-backdrop {
    right: auto;
    width: min(80rem, 100vw);
  }
}

.vertical-divider {
  pointer-events: none;
  position: absolute;
  top: 3rem;
  bottom: 1rem;
  display: none;
  width: 1px;
  background-color: var(--border-subtle);
}

@media (min-width: 768px) {
  .vertical-divider {
    display: block;
    left: calc(100% + 3rem);
  }
}

.parchment-inner {
  position: relative;
  padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
  .parchment-inner {
    padding: 4.5rem 2.5rem;
  }
}

.hub-block {
  position: relative;
  z-index: 10;
  display: flex;
  max-width: 640px;
  flex-direction: column;
  margin-bottom: 3.5rem;
}

.hub-block:last-child {
  margin-bottom: 0;
}

.hub-tag {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.hub-heading {
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hub-heading {
    font-size: 2.5rem;
  }
}

.hub-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1rem;
  /* font-weight: 500; */
  line-height: 1.45;
  color: var(--text-body);
}

@media (min-width: 768px) {
  .hub-body {
    gap: 0.75rem;
  }
}

.hub-signature {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.hub-signature-name {
  font-size: 1rem;
}

.hub-signature-img {
  margin-top: 0.25rem;
  height: auto;
  width: 110px;
  mix-blend-mode: multiply;
}

/* ==========================================================================
       RESEARCH & LAB SECTION
       ========================================================================== */
.research-section-wrapper {
  position: relative;
  margin: 4rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 0;
}

@media (min-width: 768px) {
  .research-section-wrapper {
    margin: 5rem 0;
    padding: 8rem 0;
  }
}

.research-fullwidth-backdrop {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(-1 * max(1rem, (100vw - 80rem) / 2 + 1rem));
  width: 100vw;
  background-color: var(--bg-parchment);
}

@media (min-width: 640px) {
  .research-fullwidth-backdrop {
    left: calc(-1 * max(1.5rem, (100vw - 80rem) / 2 + 1.5rem));
  }
}

@media (min-width: 768px) {
  .research-fullwidth-backdrop {
    left: calc(-1 * max(0px, (100vw - 80rem) / 2));
  }
}

.research-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .research-inner {
    padding: 0 4rem;
  }
}

.research-tag {
  display: block;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.research-heading {
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-heading);
}

@media (min-width: 768px) {
  .research-heading {
    font-size: 2.7rem;
  }
}

.research-link {
  margin-bottom: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-heading);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .research-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.research-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.research-item-title {
  font-family: var(--font-serif);
  font-size: 1.62rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-heading);
}

.research-item-desc {
  font-size: 0.975rem;
  line-height: 1.5;
  color: var(--text-body);
}

.advisor-card {
  margin-top: 2.5rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  align-self: flex-start;
  border-radius: 4px;
  border: 1px solid var(--border-gray);
  background-color: var(--bg-white);
  padding: 1rem 1.25rem;
}

.advisor-logos {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.advisor-logo-img {
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 3px;
  object-fit: contain;
}

.advisor-text {
  font-size: 1rem;
  line-height: 1.4;
  font-family: var(--font-serif);
  color: #0f172a;
}

.advisor-link {
  color: rgba(0, 0, 0, 0.6);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  font-family: var(--font-serif);
}

.advisor-link:hover {
  color: rgba(0, 0, 0, 0.85);
  text-decoration-color: rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
       RIGHT STICKY VISUALIZER COLUMN
       ========================================================================== */
.right-column {
  position: relative;
  display: none;
}

@media (min-width: 1200px) {
  .right-column {
    display: block;
    margin-right: min(0px, calc(40rem - 50vw));
    width: 530px;
  }
}

.sticky-track {
  position: relative;
  height: calc(100% - 4rem);
}

.sticky-viewport {
  position: sticky;
  top: 0rem;
  display: flex;
  height: 100vh;
  justify-content: center;
  padding-top: 32px;
}

/* @media (min-width: 768px) {
  .sticky-viewport {
    top: 4rem;
    height: calc(100vh - 4rem);
  }
} */

.paper-stack-container {
  position: relative;
  height: 80vh;
  width: 100%;
  transform: rotate(1.2deg);
}

.paper-base-image {
  position: absolute;
  inset: 0;
  height: 100vh;
  width: 100%;
  object-fit: cover;
  object-position: right;
}

.paper-inner-canvas {
  position: absolute;
  top: 6%;
  left: 2%;
  /* width: 85%; */
  width: 100%;
  /* bottom: 14%; */
  /* right: 0; */
}

.history-search-bg {
  /* position: absolute; */
  inset: 0;
  height: 86vh;
  width: 100%;
  object-fit: cover;
}


.interactive-svg-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}

.matrix-overlay-container {
  pointer-events: none;
  position: absolute;
  inset: 0;
  transition: opacity 0.5s ease;
  opacity: 0;
  transition-delay: 0s;
}

.matrix-cell {
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
}

.matrix-code-content {
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--color-blue);
  opacity: 0.6;
  white-space: normal;
  width: 100%;
  word-break: break-all;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.matrix-text-content {
  padding: 8px 10px;
  font-family: var(--font-serif);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--color-blue);
  opacity: 0.75;
  white-space: normal;
  width: 100%;
  word-break: normal;
  overflow-wrap: normal;
  box-sizing: border-box;
}

.coaches_section,
.talent_section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 40px;
  width: calc(100% + 9rem);
}

.talent_section {
  margin-top: 48px;
}

.coaches_heading,
.talent_heading {
  font-family: var(--font-serif);
  line-height: 1.1;
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.coaches_grid,
.talent_grid {
  display: grid;
  /* border-top: 1px solid #dedede; */
  border-left: 1px solid #dedede;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
}

.coaches_card,
.talent_card {
  padding: 24px;
  border-top: 1px solid #dedede;
  border-right: 1px solid #dedede;
  border-bottom: 1px solid #dedede;
}

.coaches_image_wrap,
.talent_image_wrap {
  width: 100%;
  aspect-ratio: 1 / 1.6;
  overflow: hidden;
  margin-bottom: 21px;
  background: #f5f5f2;
}

.coaches_image,
.talent_image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background-color: #f5f5f2;
}

.coaches_name,
.talent_name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.coaches_role,
.talent_role {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  color: #202020;
  max-width: 280px;
}

@media (max-width: 1199px) {
  .coaches_section,
  .talent_section {
    width: 100%;
    max-width: 100%;
  }
}

/* Tablet */
@media (max-width: 1100px) {
  .coaches_grid,
  .talent_grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coaches_card:nth-child(2n),
  .talent_card:nth-child(2n) {
    border-right: none;
  }

  .coaches_card,
  .talent_card {
    min-height: auto;
    padding: 20px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .main-section {
    padding: 0 1rem;
  }

  .parchment-inner {
    padding: 1.5rem 1rem;
  }

  .hub-heading {
    font-size: 1.85rem;
    margin-bottom: 1rem;
  }

  .hub-body {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .coaches_section,
  .talent_section {
    width: 100%;
    max-width: 100%;
    margin-top: 28px;
  }

  .talent_section {
    margin-top: 36px;
  }

  .coaches_heading,
  .talent_heading {
    font-size: 2rem;
  }

  .coaches_grid,
  .talent_grid {
    grid-template-columns: 1fr;
    border-left: 1px solid #dedede;
    border-right: 1px solid #dedede;
  }

  .coaches_card,
  .coaches_card:nth-child(2n),
  .talent_card,
  .talent_card:nth-child(2n) {
    border-right: none;
    border-top: 1px solid #dedede;
    border-bottom: none;
    min-height: auto;
    padding: 18px 14px;
  }

  .coaches_card:last-child,
  .talent_card:last-child {
    border-bottom: 1px solid #dedede;
  }

  .coaches_image_wrap,
  .talent_image_wrap {
    aspect-ratio: 1 / 1.3;
    margin-bottom: 16px;
  }

  .coaches_name,
  .talent_name {
    font-size: 21px;
    margin-bottom: 6px;
  }

  .coaches_role,
  .talent_role {
    font-size: 15px;
    max-width: 100%;
    line-height: 1.45;
  }
}

@media (max-width: 480px) {
  .main-section {
    padding: 0 0.75rem;
  }

  .parchment-inner {
    padding: 1.25rem 0.75rem;
  }

  .hub-heading {
    font-size: 1.6rem;
  }

  .coaches_heading,
  .talent_heading {
    font-size: 1.75rem;
  }

  .coaches_card,
  .talent_card {
    padding: 16px 12px;
  }

  .coaches_image_wrap,
  .talent_image_wrap {
    aspect-ratio: 1 / 1.25;
    margin-bottom: 14px;
  }

  .coaches_name,
  .talent_name {
    font-size: 19px;
  }

  .coaches_role,
  .talent_role {
    font-size: 14px;
  }
}