:root {
  --sky-50: #f2f7ff;
  --sky-100: #e1effd;
  --sky-200: #c8def1;
  --sky-300: #a7c9e8;
  --sky-500: #709ec8;
  --sky-700: #355675;
  --sand-50: #fcf8f2;
  --sand-100: #f2e8d7;
  --sand-200: #e7d5b6;
  --ink-900: #24344a;
  --ink-700: #516176;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --line: rgba(73, 101, 132, 0.15);
  --shadow-soft: 0 22px 55px rgba(53, 86, 117, 0.12);
  --shadow-lift: 0 18px 34px rgba(53, 86, 117, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Instrument Sans", sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at top left, rgba(167, 201, 232, 0.55), transparent 32%),
    radial-gradient(circle at right 15%, rgba(231, 213, 182, 0.48), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #fbf8f2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(112, 158, 200, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 158, 200, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 28px;
  background: rgba(255, 252, 248, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 0.98rem;
  letter-spacing: 0.02em;
}

.brand-mark small {
  color: var(--ink-700);
}

.brand-mark__crest {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sky-700);
  background: linear-gradient(135deg, var(--white), var(--sand-100));
  border: 1px solid rgba(112, 158, 200, 0.18);
  box-shadow: inset 0 -6px 18px rgba(112, 158, 200, 0.12);
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--ink-700);
  font-weight: 600;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  transform: translateY(-1px);
  color: var(--ink-900);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(112, 158, 200, 0.15);
}

main {
  display: grid;
  gap: 28px;
}

.hero-panel,
.panel,
.profile-card,
.badge-board,
.history-panel,
.next-panel,
.leaderboard-hero,
.rankings {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 28px;
  padding: clamp(26px, 4vw, 42px);
  align-items: center;
}

.hero-panel--dashboard {
  background:
    radial-gradient(circle at top right, rgba(167, 201, 232, 0.25), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 255, 0.84));
}

.hero-copy h1,
.leaderboard-hero h1,
.profile-card h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.3rem, 4vw, 4.25rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky-700);
}

.lede,
.section-heading p,
.profile-note {
  margin: 0;
  max-width: 56ch;
  color: var(--ink-700);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.button::after {
  content: "→";
  margin-left: 10px;
  transition: transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.button:hover::after,
.button:focus-visible::after {
  transform: translateX(4px);
}

.button--primary {
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  color: var(--white);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1px rgba(112, 158, 200, 0.18);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.stat-strip li {
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  border: 1px solid rgba(112, 158, 200, 0.16);
}

.stat-strip strong {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 2.05rem;
  margin-bottom: 6px;
}

.stat-strip span {
  color: var(--ink-700);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 28px;
}

.section-grid {
  display: grid;
  gap: 22px;
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 48rem;
}

.section-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.section-heading--compact h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.role-card {
  position: relative;
  padding: 24px;
  min-height: 212px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68));
  border: 1px solid rgba(112, 158, 200, 0.12);
  overflow: hidden;
}

.role-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 118px;
  height: 118px;
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.24);
  transform: rotate(14deg);
}

.role-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
}

.role-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-700);
  line-height: 1.6;
}

.role-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.role-card--outreach {
  background: linear-gradient(180deg, rgba(224, 241, 255, 0.92), rgba(207, 231, 248, 0.84));
}

.role-card--events {
  background: linear-gradient(180deg, rgba(255, 245, 239, 0.92), rgba(244, 225, 207, 0.88));
}

.role-card--logistics {
  background: linear-gradient(180deg, rgba(239, 246, 253, 0.94), rgba(215, 232, 244, 0.88));
}

.role-card--welfare {
  background: linear-gradient(180deg, rgba(255, 248, 237, 0.92), rgba(240, 230, 207, 0.88));
}

.split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.panel {
  padding: 26px;
}

.event-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.event-card {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-md);
  border: 1px solid rgba(112, 158, 200, 0.12);
}

.event-card img {
  width: 98px;
  height: 88px;
  object-fit: cover;
  border-radius: 18px;
}

.event-card strong,
.timeline-item strong,
.next-list strong,
.mini-panel strong {
  display: block;
  margin-bottom: 6px;
}

.event-card span,
.timeline-item span,
.next-list span,
.mini-panel span {
  color: var(--ink-700);
  line-height: 1.55;
}

.progress-list {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.progress-row {
  display: grid;
  gap: 10px;
}

.progress-row__label,
.profile-progress__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-row__label span,
.profile-progress__meta span {
  color: var(--ink-700);
}

.progress-track {
  width: 100%;
  height: 14px;
  background: rgba(112, 158, 200, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.progress-track--wide {
  height: 16px;
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sky-300), var(--sky-700));
  transition: width 900ms cubic-bezier(0.19, 1, 0.22, 1);
}

.progress-fill--complete {
  background: linear-gradient(90deg, #88d3b0, #4b8b78);
}

.text-link {
  display: inline-flex;
  margin-top: 20px;
  font-weight: 700;
  color: var(--sky-700);
}

.text-link::after {
  content: "→";
  margin-left: 8px;
}

.leaderboard-page,
.profile-page {
  display: grid;
  gap: 24px;
}

.leaderboard-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
  align-items: center;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chip {
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-700);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.chip:hover,
.chip:focus-visible,
.chip--active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--sky-500), var(--sky-700));
  color: var(--white);
  box-shadow: var(--shadow-lift);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.podium-card {
  position: relative;
  padding: 24px;
  min-height: 240px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(234, 243, 250, 0.74));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.podium-card::before {
  content: "";
  position: absolute;
  inset: auto -24px -38px auto;
  width: 138px;
  height: 138px;
  border-radius: 44px;
  transform: rotate(12deg);
  background: rgba(255, 255, 255, 0.36);
}

.podium-card--first {
  min-height: 286px;
}

.podium-card--second,
.podium-card--third {
  transform: translateY(20px);
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.podium-card h3 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 1.65rem;
}

.podium-role {
  display: block;
  margin-bottom: 16px;
  color: var(--ink-700);
}

.podium-meta {
  display: grid;
  gap: 8px;
}

.podium-meta span {
  display: inline-flex;
  width: fit-content;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  color: var(--ink-700);
  font-weight: 600;
}

.rankings {
  padding: 26px;
}

.rankings-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 1.3fr 1fr 180px;
  gap: 16px;
  align-items: center;
  padding: 18px;
  background: rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(112, 158, 200, 0.12);
}

.ranking-row__rank {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(112, 158, 200, 0.18), rgba(231, 213, 182, 0.2));
  font-weight: 800;
}

.ranking-row__student strong {
  display: block;
  margin-bottom: 4px;
}

.ranking-row__student span,
.ranking-row__role span {
  color: var(--ink-700);
}

.ranking-row__role strong,
.ranking-row__summary strong {
  display: block;
  margin-bottom: 6px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(225, 239, 253, 0.8);
  color: var(--sky-700);
  font-weight: 700;
}

.profile-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.profile-card,
.badge-board,
.history-panel,
.next-panel {
  padding: 26px;
}

.profile-card__top {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: center;
}

.profile-card__portrait {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
}

.profile-role {
  margin: 6px 0 14px;
  font-weight: 700;
  color: var(--sky-700);
}

.profile-progress {
  display: grid;
  gap: 12px;
  margin-top: 26px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
}

.mini-panels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mini-panel {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 158, 200, 0.1);
}

.badge-board {
  background:
    radial-gradient(circle at 10% 0%, rgba(231, 213, 182, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 239, 226, 0.74));
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.badge-tile {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(112, 158, 200, 0.12);
}

.badge-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sky-700);
  background: linear-gradient(135deg, rgba(225, 239, 253, 0.92), rgba(242, 232, 215, 0.92));
}

.badge-tile strong {
  display: block;
  margin-bottom: 6px;
}

.badge-tile p {
  margin: 0;
  color: var(--ink-700);
  line-height: 1.55;
}

.history-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.timeline-item {
  position: relative;
  padding: 18px 18px 18px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 158, 200, 0.12);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sky-300), var(--sky-700));
}

.timeline-date {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(225, 239, 253, 0.72);
  color: var(--sky-700);
  font-weight: 700;
}

.next-list {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.next-list li {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(112, 158, 200, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 700ms cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.reveal:nth-of-type(2) {
  animation-delay: 90ms;
}

.reveal:nth-of-type(3) {
  animation-delay: 180ms;
}

.reveal:nth-of-type(4) {
  animation-delay: 270ms;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-panel,
  .leaderboard-hero,
  .split-layout,
  .profile-shell,
  .history-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 26px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .role-cards,
  .podium,
  .mini-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-card__top {
    grid-template-columns: 1fr;
  }

  .profile-card__portrait {
    width: 100%;
    max-width: 280px;
    height: auto;
  }

  .ranking-row {
    grid-template-columns: 56px 1fr;
  }

  .ranking-row__summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 22px, 100%);
    padding-top: 18px;
  }

  .site-header {
    padding: 16px;
  }

  .hero-copy h1,
  .leaderboard-hero h1,
  .profile-card h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .stat-strip,
  .role-cards,
  .podium,
  .badge-grid,
  .mini-panels {
    grid-template-columns: 1fr;
  }

  .event-card,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .event-card img {
    width: 100%;
    height: auto;
  }

  .site-nav a {
    padding-inline: 16px;
  }

  .progress-row__label,
  .profile-progress__meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .progress-fill,
  .button,
  .button::after,
  .chip,
  .site-nav a {
    animation: none;
    transition: none;
  }
}
