@font-face {
  font-family:"Instrument Sans";
  src:url("assets/fonts/InstrumentSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-style:normal;
  font-weight:100 900;
  font-display:swap
}

@font-face {
  font-family:"Instrument Sans";
  src:url("assets/fonts/InstrumentSans-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-style:italic;
  font-weight:100 900;
  font-display:swap
}

@font-face {
  font-family:"Playfair Display";
  src:url("assets/fonts/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
  font-style:normal;
  font-weight:400 900;
  font-display:swap
}

@font-face {
  font-family:"Playfair Display";
  src:url("assets/fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf") format("truetype");
  font-style:italic;
  font-weight:400 900;
  font-display:swap
}

:root {
  --bg:#1b1c1d;
  --fg:#f4f4f4;
  --muted:#9a9a9a;
  --line:#464747;
  --soft:#242526;
  --serif:"Playfair Display",Georgia,serif;
  --sans:"Instrument Sans",Arial,sans-serif
}

* {
  box-sizing:border-box
}

html {
  scroll-behavior:smooth
}

body {
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased
}

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

a:focus-visible,button:focus-visible {
  outline:2px solid #eee;
  outline-offset:5px
}

#header,.site-main,#footer {
  width:min(1390px,calc(100% - 10vw));
  margin:auto
}

.topbar {
  min-height:105px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:25px
}

.identity {
  display:flex;
  align-items:center;
  gap:14px;
  font-family:var(--serif);
  font-size:13px;
  font-weight:bold;
  white-space:nowrap
}

.identity img {
  width:48px;
  height:48px;
  object-fit:contain
}

.identity small {
  font-size:10px;
  vertical-align:super
}

.topbar nav {
  display:flex;
  align-items:center;
  gap:30px
}

.topbar nav a {
  font-size:12px;
  color:#aaa;
  transition:color .2s
}

.topbar nav a:hover,.topbar nav a[aria-current] {
  color:white
}

.menu-toggle {
  display:none
}

.site-main {
  min-height:65vh
}

.hero {
  min-height:680px;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  gap:4vw
}

.hero-copy {
  padding:75px 0
}

.eyebrow {
  color:#a6a6a6;
  font-size:11px;
  letter-spacing:.19em;
  text-transform:uppercase;
  font-weight:700;
  margin:0 0 25px
}

.hero h1 {
  font-family:var(--serif);
  font-size:clamp(80px,10vw,150px);
  letter-spacing:-.065em;
  line-height:.95;
  margin:0 0 18px
}

.hero h2 {
  font-family:var(--serif);
  font-size:clamp(24px,3vw,42px);
  line-height:1.13;
  letter-spacing:-.04em;
  color:#a6a6a6;
  margin:0 0 24px
}

.hero-copy>p:not(.eyebrow) {
  font-size:15px;
  line-height:1.65;
  max-width:440px;
  color:#d2d2d2
}

.hero-art {
  position:relative;
  display:grid;
  place-items:center;
  min-height:520px;
  isolation:isolate;
  overflow:hidden
}

.hero-map {
  position:absolute;
  inset:0;
  margin:auto;
  width:85%;
  height:90%;
  max-height:460px;
  object-fit:contain;
  opacity:.43;
  filter:blur(9px) grayscale(1);
  z-index:-1;
  pointer-events:none
}

.hero-logo {
  position:relative;
  width:min(86%,490px);
  max-height:490px;
  height:auto;
  object-fit:contain;
  opacity:1;
  pointer-events:none
}

.text-link {
  display:inline-flex;
  gap:18px;
  align-items:center;
  margin-top:30px;
  padding-bottom:10px;
  border-bottom:1px solid #888;
  font-size:13px
}

.text-link span {
  font-size:20px
}

.section {
  padding:65px 0 105px;
  border-top:1px solid var(--line)
}

.section-head h2,.section-title {
  font-family:var(--serif);
  font-size:clamp(32px,4vw,56px);
  letter-spacing:-.05em;
  margin:0 0 40px
}

.link-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-top:1px solid var(--line);
  border-left:1px solid var(--line)
}

.link-card {
  position:relative;
  min-height:255px;
  padding:27px 25px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  transition:background .2s
}

.link-card:hover {
  background:#292a2b
}

.card-index,.round-index {
  color:#929292;
  font-size:12px;
  letter-spacing:.08em
}

.link-card h3 {
  font-family:var(--serif);
  font-size:25px;
  letter-spacing:-.035em;
  line-height:1.2;
  margin:47px 0 13px
}

.link-card p {
  font-size:13px;
  line-height:1.6;
  color:#aaa;
  max-width:240px
}

.arrow {
  position:absolute;
  right:22px;
  top:24px;
  font-size:20px
}

.page-heading {
  padding:100px 0 80px;
  border-bottom:1px solid var(--line)
}

.page-heading h1 {
  font-family:var(--serif);
  font-size:clamp(53px,7vw,95px);
  line-height:1.04;
  letter-spacing:-.055em;
  margin:0;
  max-width:950px
}

.page-lead {
  font-size:clamp(19px,2.2vw,28px);
  line-height:1.4;
  color:#b7b7b7;
  max-width:800px;
  margin:25px 0 0
}

.editorial {
  max-width:850px;
  padding:65px 0 120px
}

.content-section {
  margin-bottom:85px
}

.content-section h2,.round h2,.people-group h2,.category h3,.dataset h2 {
  font-family:var(--serif);
  letter-spacing:-.045em
}

.content-section h2 {
  font-size:45px;
  margin:0 0 8px
}

.section-lead {
  font-size:22px!important;
  line-height:1.4!important;
  color:#ddd!important;
  margin:0 0 27px!important
}

.content-section p {
  font-size:16px;
  line-height:1.75;
  color:#b7b7b7;
  max-width:740px
}

.round-list {
  border-top:1px solid var(--line)
}

.round {
  display:grid;
  grid-template-columns:90px 1fr;
  padding:35px 0 42px;
  border-bottom:1px solid var(--line)
}

.round h2 {
  font-size:32px;
  margin:0 0 12px
}

.round p {
  color:#b9b9b9;
  line-height:1.7;
  font-size:15px;
  max-width:700px;
  margin:0
}

.category-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px
}

.category {
  padding:32px;
  border:1px solid var(--line)
}

.category h3 {
  font-size:29px;
  margin:0 0 10px
}

.category p,.fine-print {
  color:#aaa;
  line-height:1.6
}

.fine-print {
  font-size:13px;
  margin-top:24px
}

.committee-grid {
  display:grid;
  grid-template-columns:1fr 1fr 1.2fr;
  gap:65px 35px;
  padding:85px 0 120px
}

.people-group h2 {
  font-size:32px;
  margin:0 0 22px
}

.people-group ul {
  list-style:none;
  margin:0;
  padding:0
}

.people-group li {
  font-size:17px;
  line-height:1.65;
  color:#d0d0d0
}

.dataset-grid {
  display:grid;
  gap:30px
}

.dataset {
  border:1px solid var(--line);
  padding:28px;
  overflow:hidden
}

.dataset h2 {
  font-size:30px;
  margin:0 0 10px
}

.dataset>p {
  color:#aaa
}

.empty-state {
  border:1px solid var(--line);
  padding:65px 40px;
  max-width:700px
}

.empty-mark {
  font-family:var(--serif);
  font-size:65px;
  color:#999
}

.empty-state h2 {
  font-family:var(--serif);
  font-size:35px;
  margin:18px 0
}

.empty-state p {
  color:#aaa;
  line-height:1.7;
  max-width:550px
}

.table-wrap {
  overflow:auto
}

table {
  border-collapse:collapse;
  width:100%;
  font-size:14px;
  text-align:left
}

th,td {
  padding:12px 16px;
  border-bottom:1px solid var(--line);
  white-space:nowrap
}

th {
  color:#ddd
}

td {
  color:#aaa
}

#footer {
  border-top:1px solid var(--line)
}

.footer-inner {
  padding:32px 0 45px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:#929292;
  font-size:12px
}

.footer-inner a {
  color:#ddd
}

@media(max-width:950px) {
  .topbar nav {
    gap:15px
  }

  .identity {
    font-size:11px
  }

  .link-grid {
    grid-template-columns:repeat(2,1fr)
  }

  .committee-grid {
    grid-template-columns:repeat(2,1fr)
  }

  .hero {
    min-height:590px
  }

  .hero-art {
    min-height:350px
  }

}

@media(max-width:650px) {
  #header,.site-main,#footer {
    width:calc(100% - 40px)
  }

  .topbar {
    min-height:78px
  }

  .identity img {
    width:39px;
    height:39px
  }

  .identity span {
    max-width:200px;
    white-space:normal
  }

  .menu-toggle {
    display:flex;
    align-items:center;
    gap:10px;
    background:none;
    border:0;
    color:#fff;
    font-family:var(--sans);
    cursor:pointer
  }

  .topbar nav {
    display:none;
    position:absolute;
    z-index:10;
    top:78px;
    left:0;
    right:0;
    background:#252627;
    padding:20px;
    flex-direction:column;
    align-items:stretch;
    border-bottom:1px solid var(--line)
  }

  .topbar nav.open {
    display:flex
  }

  .topbar nav a {
    font-size:16px;
    padding:8px
  }

  .hero {
    grid-template-columns:1fr;
    gap:0;
    min-height:0
  }

  .hero-copy {
    padding:90px 0 0
  }

  .hero h1 {
    font-size:88px
  }

  .hero-art {
    min-height:300px
  }

  .hero-logo {
    width:78%;
    max-width:370px
  }

  .hero-map {
    width:90%;
    max-height:310px;
    filter:blur(7px)
  }

  .section {
    padding:45px 0 70px
  }

  .link-grid,.category-grid,.committee-grid {
    grid-template-columns:1fr
  }

  .link-card {
    min-height:200px
  }

  .link-card h3 {
    margin-top:30px
  }

  .page-heading {
    padding:75px 0 55px
  }

  .editorial {
    padding-top:50px
  }

  .content-section h2 {
    font-size:36px
  }

  .round {
    grid-template-columns:45px 1fr
  }

  .round h2 {
    font-size:27px
  }

  .committee-grid {
    padding:60px 0
  }

  .footer-inner {
    flex-direction:column
  }

}

/* Directional entrance animations. Elements remain visible until JS enables them. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transition: opacity 750ms ease, transform 850ms cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  .reveal.from-left {
    transform: translate3d(-48px, 0, 0);
  }

  .reveal.from-right {
    transform: translate3d(48px, 0, 0);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

}

/* Visual hierarchy and homepage illustration corrections */
.identity {
  gap:12px;
  font-size:14px
}

.identity-name {
  font-size:14px
}

.identity-short {
  font-family:var(--serif);
  font-size:19px;
  font-weight:700;
  white-space:nowrap
}

.hero-art {
  isolation:isolate;
  overflow:visible
}

.hero-map {
  z-index:0;
  inset:auto;
  width:110%;
  height:110%;
  max-height:none;
  opacity:.60;
  filter:grayscale(1) brightness(0) invert(1) blur(7px);
  transform:scale(1.05)
}

.hero-logo {
  z-index:1;
  width:min(90%,520px);
  max-height:520px;
  filter:drop-shadow(0 10px 35px rgba(0,0,0,.28))
}

.rankings-note {
  max-width:850px;
  margin:30px 0 0 0;
  color:#c4c4c4;
  line-height:1.7;
  font-size:18px
}

.rankings-note strong {
  color:var(--fg);
  font-weight:700
}

.committee-grid {
  grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);
  gap:clamp(40px,8vw,140px)
}

.committee-primary {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:55px 40px;
  align-content:start
}

.committee-primary .people-group:last-child {
  grid-column:1/-1;
  border-top:1px solid var(--line);
  padding-top:35px
}

.committee-primary .people-group h2 {
  font-size:clamp(29px,3vw,38px)
}

.committee-primary .people-group li {
  font-size:clamp(18px,1.6vw,22px);
  line-height:1.75;
  color:#eee
}

.committee-secondary .people-group h2 {
  font-size:clamp(25px,2.5vw,32px)
}

.committee-secondary .people-group li {
  font-size:15px;
  line-height:1.75;
  color:#b8b8b8
}

@media(max-width:950px) {
  .identity-name {
    display:none
  }

  .committee-grid {
    gap:45px
  }

  .committee-primary {
    grid-template-columns:1fr
  }

}

@media(max-width:650px) {
  .identity-short {
    font-size:19px
  }

  .hero-map {
    width:112%;
    height:110%;
    filter:grayscale(1) brightness(0) invert(1) blur(6px)
  }

  .hero-logo {
    width:85%
  }

  .rankings-note {
    margin-left:0
  }

  .committee-grid {
    grid-template-columns:1fr;
    gap:45px
  }

  .committee-primary {
    grid-template-columns:1fr;
    gap:40px
  }

  .committee-primary .people-group:last-child {
    grid-column:auto
  }

}

/* Competition heads: editorial vertical timeline */
.heads-timeline {
  list-style:none;
  margin:0;
  padding:4px 0 0 0;
  position:relative
}

.heads-timeline::before {
  content:"";
  position:absolute;
  left:8px;
  top:18px;
  bottom:18px;
  width:1px;
  background:linear-gradient(to bottom,#f0f0f0 0%,#777 55%,#3a3b3c 100%)
}

.heads-timeline .timeline-entry {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:0 0 12px 35px;
  min-height:0
}

.heads-timeline .timeline-entry:last-child {
  padding-bottom:0;
  min-height:0
}

.heads-timeline .timeline-entry::before {
  content:"";
  position:absolute;
  left:2px;
  top:9px;
  width:13px;
  height:13px;
  border-radius:50%;
  background:var(--bg);
  border:2px solid #e8e8e8;
  box-shadow:0 0 0 4px var(--bg);
  z-index:1
}

.heads-timeline .timeline-year {
  font-family:var(--sans);
  font-size:12px;
  letter-spacing:.17em;
  font-weight:700;
  color:#aeb0b0;
  line-height:1.5
}

.heads-timeline .timeline-name {
  font-family:var(--sans);
  font-size:clamp(18px,1.6vw,22px);
  font-weight:400;
  letter-spacing:normal;
  line-height:1.75;
  color:var(--fg)
}

.heads-group .heads-timeline li {
  line-height:inherit
}

@media(max-width:650px) {
  .heads-timeline .timeline-entry {
    padding-bottom:10px
  }

  .heads-timeline .timeline-name {
    font-size:22px
  }

}

/* Accessible, persistent light/dark theme toggle */
.header-actions {
  display:flex;
  align-items:center;
  gap:22px
}

.theme-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-shrink:0;
  cursor:pointer;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--soft);
  color:var(--fg);
  padding:9px 13px;
  font:600 12px var(--sans);
  white-space:nowrap;
  transition:background .2s,border-color .2s
}

.theme-toggle:hover {
  background:var(--hover)
}

.theme-symbol {
  font-size:19px;
  line-height:1
}

:root {
  --hover:#292a2b;
  --focus:#eee;
  --nav:#aaa;
  --nav-active:#fff;
  --eyebrow:#a6a6a6;
  --hero-secondary:#a6a6a6;
  --body-secondary:#d2d2d2;
  --lead:#b7b7b7;
  --copy:#b7b7b7;
  --strong-copy:#ddd;
  --card-copy:#aaa;
  --timeline-year:#aeb0b0;
  --timeline-dot:#e8e8e8;
  --timeline-start:#f0f0f0;
  --timeline-mid:#777;
  --timeline-end:#3a3b3c;
  --map-filter:grayscale(1) brightness(0) invert(1) blur(7px);
  --map-opacity:.60;
  --logo-shadow:0 10px 35px rgba(0,0,0,.28)
}

:root[data-theme="light"] {
  --bg:#f7f5f0;
  --fg:#252525;
  --muted:#62605d;
  --line:#d8d4cd;
  --soft:#eeeae3;
  --hover:#e5e0d8;
  --focus:#343434;
  --nav:#5b5853;
  --nav-active:#202020;
  --eyebrow:#66615b;
  --hero-secondary:#5d5953;
  --body-secondary:#494640;
  --lead:#55514c;
  --copy:#5d5852;
  --strong-copy:#36332f;
  --card-copy:#625d57;
  --timeline-year:#68625c;
  --timeline-dot:#55514c;
  --timeline-start:#77716b;
  --timeline-mid:#a49d94;
  --timeline-end:#d3cdc4;
  --map-filter:grayscale(1) brightness(0) blur(7px);
  --map-opacity:.20;
  --logo-shadow:0 10px 30px rgba(0,0,0,.08)
}

a:focus-visible,button:focus-visible {
  outline-color:var(--focus)
}

.topbar nav a {
  color:var(--nav)
}

.topbar nav a:hover,.topbar nav a[aria-current] {
  color:var(--nav-active)
}

.eyebrow {
  color:var(--eyebrow)
}

.hero h2 {
  color:var(--hero-secondary)
}

.hero-copy>p:not(.eyebrow) {
  color:var(--body-secondary)
}

.page-lead,.content-section p {
  color:var(--lead)
}

.section-lead {
  color:var(--strong-copy)!important
}

.round p,.committee-secondary .people-group li {
  color:var(--copy)
}

.link-card:hover {
  background:var(--hover)
}

.link-card p,.category p,.fine-print,.dataset>p,.empty-state p,td {
  color:var(--card-copy)
}

.card-index,.round-index,.footer-inner {
  color:var(--muted)
}

.text-link {
  border-color:var(--muted)
}

.people-group li,.committee-primary .people-group li {
  color:var(--fg)
}

.rankings-note {
  color:var(--copy)
}

.heads-timeline .timeline-year {
  color:var(--timeline-year)
}

.heads-timeline::before {
  background:linear-gradient(to bottom,var(--timeline-start),var(--timeline-mid) 55%,var(--timeline-end))
}

.heads-timeline .timeline-entry::before {
  border-color:var(--timeline-dot)
}

.empty-mark {
  color:var(--muted)
}

th {
  color:var(--fg)
}

.footer-inner a {
  color:var(--fg)
}

.hero-map {
  opacity:var(--map-opacity);
  filter:var(--map-filter)
}

.hero-logo {
  filter:drop-shadow(var(--logo-shadow))
}

@media(max-width:650px) {
  .header-actions {
    gap:10px
  }

  .theme-toggle {
    padding:8px 10px
  }

  .theme-label {
    display:none
  }

  .topbar nav {
    background:var(--soft)
  }

  .menu-toggle {
    color:var(--fg)
  }

  .hero-map {
    filter:var(--map-filter)
  }

}

/* Homepage: trace the uploaded official SVG over the blurred Philippines map. */
.hero-logo-trace {
  position: relative;
  z-index: 2;
  width: min(90%, 520px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--fg);
  filter: drop-shadow(var(--logo-shadow));
}

.hero-logo-trace .hero-logo-fallback,
.hero-logo-trace .hero-trace-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  grid-area: 1 / 1;
}

.hero-logo-trace .hero-trace-svg {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.hero-trace-svg path {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Start with the PNG until the vector animation is ready. */
.hero-logo-trace.trace-active .hero-logo-fallback,
.hero-logo-trace.trace-complete .hero-logo-fallback {
  opacity: 0;
}

.hero-logo-trace.trace-active .hero-trace-svg path {
  fill-opacity: 0;
  stroke-dasharray: var(--path-length);
  stroke-dashoffset: var(--path-length);
  animation:
    pho-logo-draw 6.0s cubic-bezier(.22, .7, .2, 1) var(--path-delay) forwards,
    pho-logo-fill 1.1s ease calc(var(--path-delay) + 0.5s) forwards;
}

@keyframes pho-logo-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes pho-logo-fill {
  to { fill-opacity: 1; }
}

/* The map is a distinct, blurred layer behind the traced emblem. */
.hero-art .hero-map {
  position: absolute;
  z-index: 0;
  width: 115%;
  height: 115%;
  opacity: var(--map-opacity);
  filter: var(--map-filter);
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-trace .hero-trace-svg path {
    fill-opacity: 1;
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }
}

/* Mobile navigation: anchor the dropdown to the header and prevent overflow. */
.topbar {
  position: relative;
}

@media (max-width: 650px) {
  .identity {
    min-width: 0;
  }

  .identity-short {
    white-space: nowrap;
  }

  .header-actions {
    margin-left: auto;
    flex-shrink: 0;
  }

  .menu-toggle {
    order: 2;
    flex-shrink: 0;
  }

  .topbar nav {
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
  }
}

@media (max-width: 380px) {
  .identity {
    gap: 6px;
  }

  .identity img {
    width: 32px;
    height: 32px;
  }

  .identity-short {
    font-size: 16px;
  }

  .menu-toggle {
    font-size: 12px;
    gap: 5px;
  }

  .theme-toggle {
    padding: 7px 8px;
  }
}

.noscript-note {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1rem;
  color: var(--fg);
  font-family: var(--sans);
}
