/* Prevent flash of old/placeholder content before site.json loads */
html.js-loading #playerName,
html.js-loading #playerSub,
html.js-loading #playerCurrent,
html.js-loading #playerFacts,
html.js-loading #profileParagraph,
html.js-loading #glance,
html.js-loading #clubGrid,
html.js-loading #featuredReelCard {
  visibility: hidden;
}
:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  --shadow2: 0 16px 34px rgba(0, 0, 0, 0.1);
  --radius: 14px;
  --nav: #0b0f16;
  --nav2: #1f2937;
  --soft: #f8fafc;
  --season-alt: #f5f7fb;
  --hero-name: clamp(26px, 4.2vw, 40px);
  --hero-sub: 16px;
  --hero-positions: 14px;
  --hero-current: 15px;
  --hero-facts: 13px;
  --season-section-gap: 1px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}
a {
  color: inherit;
}
p {
  line-height: 1.65;
  margin: 0;
}
ul {
  margin: 0;
}
code {
  background: var(--soft);
  border: 1px solid var(--border);
  padding: 0.08rem 0.35rem;
  border-radius: 8px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(135deg, var(--nav), var(--nav2));
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 12px;
}
.brand {
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.brand a {
  color: #fff;
  text-decoration: none;
}

.brand-logo {
  height: 55px; /* Adjusts the thd27 desktop logo */
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  opacity: 0.92;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}
.nav-links a:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.18);
}
/* Active nav pill (current page) */
.nav-links a[aria-current='page'] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}
@media (max-width: 420px) {
  .nav-links a {
    font-size: 13px;
    padding: 7px 9px;
  }
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 30px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0b0f16, #1f2937);
  color: #fff;
  border-radius: 18px;
  padding: 22px 16px;
  box-shadow: var(--shadow2);
}
.hero h1 {
  margin: 0 0 6px 0;
  font-size: var(--hero-name);
  line-height: 1.15;
}
#playerSub {
  font-size: var(--hero-sub);
  font-weight: 800;
  color: #fff;
}
#playerPositions {
  font-size: var(--hero-positions);
  font-weight: 750;
  color: rgba(255, 255, 255, 0.95);
  margin-top: 0;
  line-height: 1.15;
}
#playerCurrent {
  font-size: var(--hero-current);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.hero-facts {
  font-size: var(--hero-facts);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  margin-top: 8px;
  line-height: 1.2;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.hero-right img {
  display: block;
  width: auto;
}
.hero-right img.sporting {
  height: 134px;
}
.hero-right img.ecnl {
  height: 126px;
}
/* HERO: mobile behavior (logos vertically centered) */
@media (max-width: 720px) {
  .hero {
    position: relative;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Make the text column the positioning reference */
  .hero-left {
    position: relative;
    padding-right: 120px; /* reserve space so text doesn't run under logos */
  }

  /* Vertically center logos within the hero-left text block */
  .hero-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    gap: 10px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: flex-end;
  }

  .hero-right img.sporting,
  .hero-right img.ecnl {
    height: 64px;
  }
}

@media (max-width: 420px) {
  .hero-left {
    padding-right: 110px;
  }

  .hero-right img.sporting,
  .hero-right img.ecnl {
    height: 54px;
  }
}

@media (max-width: 360px) {
  .hero-left {
    padding-right: 0;
  }

  .hero-right {
    position: static;
    transform: none;
    justify-content: flex-end;
    margin-top: 0;
    margin-bottom: 6px;
  }
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 800;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
.btn.secondary {
  background: transparent;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.6);
  outline-offset: 3px;
  border-radius: 12px;
}
/* Buttons inside normal white cards should look like buttons */
.card .btn {
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--border);
}

.card .btn:hover {
  background: #eef2f7;
}

.card .btn.secondary {
  background: transparent;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  font-size: 13px;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
/* Club page header card (top box on club.html) */
body[data-page='club'] .container > .card:first-of-type {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #fff;
  border: none;
}

body[data-page='club'] .container > .card:first-of-type .page-title {
  color: #fff;
}

body[data-page='club'] .container > .card:first-of-type .muted {
  color: rgba(255, 255, 255, 0.75);
}
.stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
/* Tighten the gap between "Highlights" heading and the video box inside season cards */
.season .stack {
  margin-top: var(--season-section-gap);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.resume-note {
  margin: 8px 0 10px 0;
  opacity: 0.85;
}
.h2 {
  font-size: 18px;
  margin: 0 0 10px 0;
  font-weight: 900;
}
.page-title {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 950;
  margin: 6px 0 12px 0;
  letter-spacing: 0.2px;
}
/* Club page: tighten space between title and years */
body[data-page='club'] .page-title {
  margin-bottom: 6px;
}
/* Resume page title should match page-title scale */
body[data-page='resume'] .card-head {
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 950;
  letter-spacing: 0.2px;
}

/* Section header strip inside cards */
/* Only use a header strip when you explicitly opt in */
.card-head {
  display: block;
  padding: 10px 12px;
  margin: -16px -16px 12px -16px;
  background: var(--soft);
  border-bottom: 1px solid var(--border);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}
/* Resume page: make the "Resume" header strip feel like a page hero */
body[data-page='resume'] .card-head {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
hr.sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* Clubs grid */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (min-width: 1020px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tiles */
.tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}
.tile .img {
  height: 190px;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-color: transparent;
}
.tile .body {
  padding: 12px;
}
.tile .title {
  font-weight: 950;
  margin: 0 0 4px 0;
}
.tile .meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.badge {
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--soft);
  font-size: 12px;
  color: #374151;
}

/* Hard reset tile image rendering */
.tile .img {
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  background-blend-mode: normal !important;
}
.tile .img::before,
.tile .img::after {
  content: none !important;
}

/* Season blocks */
.season {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
  display: grid;
  gap: 12px;
}
/* Club page: subtle hover lift so seasons feel interactive */
@media (hover: hover) and (pointer: fine) {
  body[data-page='club'] #clubSeasons .season {
    transition:
      transform 0.12s ease,
      box-shadow 0.12s ease,
      border-color 0.12s ease;
  }

  body[data-page='club'] #clubSeasons .season:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
    border-color: rgba(17, 24, 39, 0.18);
  }
}
/* Club page: subtle alternating tint so seasons are easier to scan */
body[data-page='club'] #clubSeasons .season:nth-child(even) {
  background: var(--season-alt);
}
.season-head {
  display: block;
  margin: -14px;
  margin-bottom: 12px;
}

.season-headerbar {
  padding: 12px 14px;
  background: var(--soft);
  border-bottom: 2px solid var(--border);
  border-left: 6px solid #111827;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.season-title {
  font-weight: 950;
  font-size: 19px;
  line-height: 1.2;
}

.season-sub {
  color: var(--muted);
  font-size: 13px;
}
.season-stats {
  font-weight: 950;
  font-size: 13px;
  color: #111827;
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 520px) {
  .kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 920px) {
  .kv {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.kv .box {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--soft);
}
.kv .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.kv .v {
  font-weight: 900;
  line-height: 1.15;
}
/* Season stats: small "As of" line under the main numbers */
.kv .v .stat-asof {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.85;
  line-height: 1.2;
}

.list {
  margin: 10px 0 0 0;
  padding-left: 18px;
}
.list li {
  margin: 6px 0;
  line-height: 1.45;
}
/* Nested accomplishments sub-bullets: reduce indentation a bit */
.list .sublist {
  margin: 4px 0 0 0;
  padding-left: 14px; /* was effectively larger due to browser defaults */
}

.list .sublist li {
  margin: 3px 0;
}
/* Tighten season content spacing */
.season .h2 {
  margin-bottom: 2px;
}
.season .list {
  margin-top: var(--season-section-gap);
}
.season .list li {
  margin: 3px 0;
}
/* Subtle emphasis for Champions / Finalists text */
.season .list li strong {
  font-weight: 600;
  color: #111827; /* optional: anchors the emphasis without adding color */
}
/* =========================================================
   MOBILE – SEASON + ACCOMPLISHMENTS TUNING
   Affects club.html season cards only
   ========================================================= */
@media (max-width: 520px) {
  /* Season container spacing */
  .season {
    padding: 12px;
  }

  .season .h2 {
    margin-bottom: 1px;
  }

  /* Accomplishments list (your accomplishments render into .season .list) */
  .season .list li {
    margin: 2px 0;
    font-size: 14.5px; /* shrink 1–2px */
    line-height: 1.3;
    font-weight: 525;
  }

  /* If/when we wrap “Champions” / “Finalists” in <strong> via JS */
  .season .list li strong {
    font-weight: 700;
  }

  /* Nested sub-bullets (your JS creates <ul class="sublist"> inside a li) */
  .season .list li .sublist li {
    font-size: 13px;
    line-height: 1.25;
    margin: 2px 0;
    font-weight: 500;
  }

  /* Tile image adjustment */
  .tile .img {
    height: 210px;
    background-position: center 30%;
  }
}

/* Highlight embeds */
.embed {
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 12px 14px;
  background: var(--soft);
  color: #64748b;
}
.embed-title {
  font-weight: 950;
  color: #111827;
}
.embed-note {
  font-size: 13px;
  margin-top: 4px;
  color: #64748b;
}
.embed a {
  color: #0f172a;
  font-weight: 900;
}

/* Responsive video embeds (no crop) */
.video-wrap {
  margin-top: 10px;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

/* On small screens, let it go full width */
@media (max-width: 720px) {
  .video-wrap {
    max-width: 100%;
  }
}

/* Footer + breadcrumb */
.footer {
  margin: 18px 0 8px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px 0;
  padding: 0;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}
/* Mobile polish: nav + hero */
/* NAV: stack/center on tablets + phones (fixes iPad Mini portrait) */
@media (max-width: 820px) {
  .nav-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
  }

  .brand {
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
    text-align: center;
  }

  .brand-logo {
    height: 46px;
    width: auto;
    display: block;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
    padding-top: 8px;
  }

  .nav-links a {
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    line-height: 1.1;
  }
  /* Slightly tighter nav pills so iPhone Pro fits in 2 lines */
  .nav-links {
    column-gap: 6px;
    row-gap: 6px;
    padding-top: 6px;
  }

  .nav-links a {
    padding: 6px 8px;
    font-size: 11.5px;
  }
  /* iPhone-ish: nudge tighter to hold 2 lines */
  @media (max-width: 430px) {
    .nav-links {
      column-gap: 5px;
      row-gap: 5px;
    }

    .nav-links a {
      padding: 6px 7px;
      font-size: 11px;
    }
  }
}
@media (max-width: 520px) {
  /* Mobile hero sizing overrides (this is the only place you change mobile sizes) */
  :root {
    --hero-name: 26px;
    --hero-sub: 12.5px;
    --hero-positions: 12px;
    --hero-current: 14px;
    --hero-facts: 11px;
  }

  /* HERO box sizing (mobile) */
  .hero {
    padding: 14px 14px;
    border-radius: 18px;
  }

  /* HERO text behavior only (sizes controlled by variables) */
  #playerSub,
  #playerPositions,
  #playerCurrent {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-facts {
    line-height: 1.25;
  }

  /* Buttons: make them feel intentional on mobile */
  .actions {
    margin-top: 12px;
    gap: 8px;
  }

  .btn {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
  }

  /* Chips: reduce crowded look */
  .chips {
    margin-top: 10px;
    gap: 6px;
  }

  .chip {
    padding: 7px 9px;
    font-size: 12px;
  }
}
/* iPhone-sized screens: tighten hero */
@media (max-width: 430px) {
  :root {
    --hero-name: 22px;
    --hero-sub: 12px;
    --hero-positions: 11px;
    --hero-current: 12.5px;
    --hero-facts: 10.5px;
  }

  .hero {
    padding: 12px 12px;
  }

  .hero-grid {
    gap: 6px;
  }

  .hero-facts {
    margin-top: 6px;
  }

  .chips {
    margin-top: 8px;
  }

  .actions {
    margin-top: 10px;
  }
}
@media (max-width: 430px) {
  .season-sub {
    font-size: 12px;
    line-height: 1.2;
  }
}
/* Mobile landscape: force single-row nav with tighter pills */
@media (max-width: 920px) and (orientation: landscape) {
  .nav-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    width: auto;
    flex-wrap: nowrap;
    justify-content: center;
    padding-top: 0;
    gap: 6px;
    overflow: hidden;
  }

  .nav-links a {
    font-size: 12px;
    padding: 6px 9px;
    line-height: 1;
    white-space: nowrap;
  }
}

.pdf-wrap {
  margin-top: 12px;
  width: 100%;
  height: 88vh;
  min-height: 820px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);

  /* allow the embedded PDF viewer to scroll */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* make sure the iframe actually fills the wrapper */
.pdf-wrap iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

@media (max-width: 520px) {
  .pdf-wrap {
    height: 80vh;
    min-height: 620px;
  }
}
/* Subtle emphasis for Champions / Finalists */
.season .list li strong {
  font-style: italic;
  font-weight: 650; /* keeps it restrained */
}
/* Phone-only: tighten season subline to avoid awkward wraps */
@media (max-width: 520px) {
  .season-sub {
    font-size: 12px;
    line-height: 1.25;
  }
}
/* Phone-only: season header title sizing */
@media (max-width: 520px) {
  .season-title {
    font-size: 15.7px;
    line-height: 1.2;
  }
}
