:root {
  color-scheme: light;
  --ink: #17201f;
  --ink-soft: #58625f;
  --paper: #e9eeeb;
  --paper-strong: #f8faf8;
  --line: rgba(23, 32, 31, 0.16);
  --teal: #0d7f73;
  --coral: #d35d48;
  --blue: #315b79;
  --gold: #e0aa32;
  --dark: #151a19;
  --dark-soft: #242b29;
  --white: #ffffff;
  --cool: #dce6e2;
  --shadow: 0 18px 44px rgba(17, 27, 25, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

body.lang-zh .en,
body.lang-en .zh {
  display: none !important;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--dark);
  color: var(--white);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 18px clamp(20px, 5%, 72px);
  background: rgba(31, 31, 31, 0.32);
  color: var(--white);
  backdrop-filter: blur(10px);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 248, 0.95);
  color: var(--ink);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-weight: 800;
  box-shadow: inset 0 -4px 0 var(--gold);
}

.brand-name,
.brand-role {
  display: block;
}

.brand-name {
  font-size: 1rem;
  font-weight: 800;
}

.brand-role {
  color: currentColor;
  font-size: 0.8rem;
  opacity: 0.74;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  position: relative;
  opacity: 0.82;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  background: var(--gold);
  content: "";
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  opacity: 1;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 42px);
  gap: 4px;
  padding: 4px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.language-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 800;
}

.language-switch button[aria-pressed="true"] {
  background: var(--white);
  color: var(--dark);
}

.site-header.is-scrolled .language-switch button[aria-pressed="true"] {
  background: var(--dark);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: end;
  padding: 116px clamp(20px, 5%, 72px) 56px;
  overflow: hidden;
  background-image: url("assets/desk-atelier.png");
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 13, 0.72);
}

.hero-content {
  position: relative;
  width: min(820px, 100%);
  border-left: 3px solid var(--gold);
  padding-left: 26px;
}

.detail-hero {
  position: relative;
  min-height: 66svh;
  display: grid;
  align-items: end;
  padding: 116px 0 56px;
  overflow: hidden;
  background-image: url("assets/desk-atelier.png");
  background-position: center;
  background-size: cover;
  color: var(--white);
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 13, 0.74);
}

.detail-hero-content {
  position: relative;
  width: min(980px, calc(100% - 40px));
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: 4.4rem;
  line-height: 1.05;
}

.back-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-bottom: 22px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.62);
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  line-height: 1.05;
}

.hero h1 {
  font-size: 5.2rem;
  font-weight: 900;
}

.lede {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.28rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-weight: 800;
}

.button.primary {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--dark);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 800px;
  margin: 36px 0 0;
}

.quick-facts div {
  min-height: 78px;
  border: 0;
  border-top: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 0;
  padding: 12px 0 0;
  background: transparent;
}

.quick-facts dt {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-facts dd {
  margin: 0;
  color: var(--white);
  font-weight: 800;
}

.section {
  scroll-margin-top: 84px;
  padding: 92px 0;
  background: var(--paper);
}

.band-light {
  background: var(--paper-strong);
}

.band-dark {
  background: var(--dark);
  color: var(--white);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.profile-grid {
  display: grid;
  grid-template-columns: 0.35fr 1.65fr;
  gap: 40px;
  align-items: start;
}

.section h2 {
  font-size: 2.65rem;
  font-weight: 900;
}

.section p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.profile-grid > div:last-child > p {
  max-width: 850px;
  margin: 22px 0 0;
}

.profile-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-signals > div {
  min-width: 0;
  padding: 18px 20px;
  border-left: 1px solid var(--line);
}

.profile-signals > div:first-child {
  border-left: 0;
  padding-left: 0;
}

.signal-index {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.profile-signals strong {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
}

.profile-signals p {
  margin: 4px 0 0 !important;
  font-size: 0.9rem !important;
}

.band-dark p {
  color: rgba(255, 255, 255, 0.76);
}

.profile-note {
  border-left: 6px solid var(--teal);
  padding-left: 22px;
}

.profile-note strong {
  color: var(--teal);
}

.section-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading p {
  margin: 0;
  max-width: 470px;
}

.subsection-title {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: end;
  margin: 24px 0 18px;
}

.subsection-title h3 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.subsection-title p {
  margin: 0;
  font-size: 0.98rem;
}

.compact-title {
  margin-top: 44px;
}

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

.scholarship-card {
  position: relative;
  display: block;
  min-height: 214px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  padding: 22px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(17, 27, 25, 0.05);
}

.scholarship-card:nth-child(2) {
  border-top-color: var(--coral);
}

.scholarship-card:nth-child(3) {
  border-top-color: var(--blue);
}

.scholarship-card:nth-child(4) {
  border-top-color: var(--gold);
}

.scholarship-card:nth-child(5) {
  border-top-color: var(--teal);
}

.scholarship-card:nth-child(6) {
  border-top-color: var(--coral);
}

.linked-scholarship {
  position: relative;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.linked-scholarship:hover,
.linked-scholarship:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(31, 31, 31, 0.18);
  outline: none;
}

.scholarship-card h4 {
  margin: 28px 0 12px;
  font-size: 1.08rem;
  line-height: 1.25;
}

.amount {
  display: block;
  color: var(--teal);
  font-size: 2rem;
  line-height: 1.05;
}

.scholarship-card p {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

.featured-scholarship {
  border-color: var(--dark);
  border-top-color: var(--gold);
  background: var(--dark);
  color: var(--white);
}

.featured-scholarship .card-number {
  background: var(--gold);
  color: var(--dark);
}

.featured-scholarship .amount {
  color: var(--gold);
}

.featured-scholarship p {
  color: rgba(255, 255, 255, 0.84);
}

.card-link {
  display: inline-flex;
  margin-top: 18px;
  border-bottom: 2px solid var(--gold);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 900;
}

.card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border-radius: 6px;
  background: rgba(55, 90, 127, 0.12);
  color: var(--blue);
  font-weight: 900;
}

.accent-card {
  background: var(--teal);
  color: var(--white);
}

.accent-card .card-number {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.accent-card p {
  color: rgba(255, 255, 255, 0.84);
}

.summary-heading {
  grid-template-columns: minmax(0, 0.9fr);
}

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

.summary-card {
  display: block;
  min-height: 230px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 24px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(17, 27, 25, 0.05);
}

.summary-card:nth-child(2) {
  border-left-color: var(--coral);
}

.summary-card:nth-child(3) {
  border-left-color: var(--blue);
}

.summary-card:nth-child(4) {
  border-left-color: var(--gold);
}

.summary-card:nth-child(5) {
  border-left-color: var(--teal);
}

.linked-summary-card {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.linked-summary-card:hover,
.linked-summary-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(27, 138, 122, 0.38);
  box-shadow: 0 18px 42px rgba(31, 31, 31, 0.14);
  outline: none;
}

.summary-card h3 {
  margin: 0 0 16px;
  color: var(--teal);
  font-size: 1.32rem;
  line-height: 1.2;
}

.summary-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.summary-card li::marker {
  color: var(--gold);
}

.summary-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 0;
  border-bottom: 2px solid rgba(49, 91, 121, 0.32);
  border-radius: 0;
  padding: 0;
  margin-top: 18px;
  background: transparent;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 900;
}

.detail-heading {
  grid-template-columns: minmax(0, 1fr);
}

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

.advantage-card,
.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(31, 31, 31, 0.06);
}

.advantage-card h3,
.evidence-card h3 {
  margin: 22px 0 12px;
  color: var(--teal);
  font-size: 1.32rem;
  line-height: 1.2;
}

.advantage-card p {
  margin: 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}

.evidence-card h3 {
  margin-top: 0;
}

.evidence-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.evidence-list li::marker {
  color: var(--gold);
}

.evidence-list a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-bottom: 2px solid rgba(55, 90, 127, 0.24);
  color: var(--blue);
  font-weight: 800;
}

.evidence-list a:hover,
.evidence-list a:focus-visible {
  border-color: var(--gold);
  color: var(--teal);
  outline: none;
}

.award-feature-list {
  display: grid;
  gap: 12px;
}

.award-feature-item {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(248, 244, 234, 0.56);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.award-feature-item:hover,
.award-feature-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(27, 138, 122, 0.4);
  background: var(--white);
  outline: none;
}

.award-feature-item strong {
  color: var(--blue);
  font-size: 1rem;
  line-height: 1.3;
}

.award-feature-item span {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.dark-evidence {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.dark-evidence h3 {
  color: var(--gold);
}

.band-dark .evidence-list {
  color: rgba(255, 255, 255, 0.8);
}

.closing-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.page-button {
  align-self: center;
}

.process-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 64px;
  align-items: start;
}

.process-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-list li {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px 18px;
  min-height: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  padding: 24px 0;
  background: transparent;
}

.process-list li:first-child {
  border-top: 2px solid var(--gold);
}

.step {
  grid-row: span 2;
  display: inline-grid;
  width: 50px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font-weight: 900;
}

.process-list strong {
  font-size: 1.1rem;
}

.process-list p {
  margin: 0;
}

.project-section {
  background: var(--dark);
}

.project-heading {
  align-items: end;
}

.project-heading p {
  color: rgba(255, 255, 255, 0.72);
}

.featured-projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  padding: 24px;
  background: var(--dark-soft);
}

.linked-project-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.linked-project-card:hover,
.linked-project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(224, 170, 50, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  outline: none;
}

.equity-project {
  border-top-color: var(--coral);
}

.data-project {
  border-top-color: var(--teal);
}

.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-topline span {
  color: var(--gold);
}

.equity-project .project-topline span {
  color: #ee8a74;
}

.data-project .project-topline span {
  color: #57c7ba;
}

.project-card h3 {
  margin: 22px 0 14px;
  color: var(--white);
  font-size: 1.28rem;
  line-height: 1.25;
}

.project-card > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.96rem;
}

.project-metrics {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
}

.project-metrics > div {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 11px 0;
}

.project-metrics dt {
  color: var(--white);
  font-size: 1.02rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.project-metrics dd {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  line-height: 1.4;
}

.project-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  margin-top: 12px;
  border-bottom: 2px solid var(--gold);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
}

.project-link:hover,
.project-link:focus-visible {
  border-color: var(--teal);
  color: #7adace;
  outline: none;
}

.project-card-detail-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 12px;
}

.linked-project-card:hover .project-card-detail-link,
.linked-project-card:focus-visible .project-card-detail-link {
  border-color: var(--teal);
  color: #7adace;
}

.experience-rows {
  margin-top: 38px;
  border-top: 2px solid var(--gold);
}

.professional-experience {
  margin-top: 0;
  margin-bottom: 40px;
}

.experience-highlights {
  display: grid;
  gap: 10px;
  max-width: 830px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
}

.experience-highlights li::marker {
  color: var(--gold);
}

.experience-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 24px 0;
}

.experience-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.experience-label span {
  color: var(--gold);
  font-size: 1rem;
  font-weight: 900;
}

.experience-row h3 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 1.16rem;
  line-height: 1.3;
}

.experience-row p {
  max-width: 830px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.96rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.games-section {
  background: var(--cool);
}

.game-disclaimer,
.game-privacy {
  margin: 0 0 28px;
  border-left: 3px solid var(--blue);
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.game-disclaimer h3,
.game-privacy h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.game-disclaimer p,
.game-privacy p {
  margin: 0 0 8px;
}

.game-disclaimer p:last-child,
.game-privacy p:last-child {
  margin-bottom: 0;
}

.game-privacy {
  border-left-color: var(--teal);
}

.game-privacy summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.game-privacy summary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.game-privacy dl {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.game-privacy dt {
  color: var(--ink);
  font-weight: 700;
}

.game-privacy dd {
  margin: 2px 0 0;
}

.game-privacy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.game-privacy .privacy-updated {
  margin-top: 12px;
  font-size: 0.8rem;
}

.game-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  padding: 24px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(17, 27, 25, 0.07);
}

.game-card:nth-child(2) {
  border-top-color: var(--blue);
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.game-card h3 {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 1.45rem;
  line-height: 1.1;
}

.game-card p {
  margin: 0;
  font-size: 0.96rem;
}

.difficulty-control {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.difficulty-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.difficulty-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: rgba(55, 90, 127, 0.08);
}

.difficulty-switch button {
  display: grid;
  min-width: 0;
  min-height: 50px;
  place-items: center;
  gap: 1px;
  border: 0;
  border-radius: 6px;
  padding: 6px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.15;
}

.difficulty-switch button small {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0.74;
}

.difficulty-switch button:hover,
.difficulty-switch button:focus-visible {
  background: rgba(27, 138, 122, 0.12);
  color: var(--teal);
  outline: none;
}

.difficulty-switch button[aria-pressed="true"] {
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(31, 31, 31, 0.18);
}

.game-button,
.move-pad button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--dark);
  color: var(--white);
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.game-button:hover,
.game-button:focus-visible,
.move-pad button:hover,
.move-pad button:focus-visible {
  background: var(--teal);
}

.game-button:disabled,
.game-button:disabled:hover {
  background: rgba(31, 31, 31, 0.28);
  color: rgba(255, 255, 255, 0.78);
  cursor: not-allowed;
}

.sudoku-start-button {
  background: var(--teal);
}

.secondary-game-button {
  background: var(--blue);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.score-row > span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(220, 168, 68, 0.1);
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.score-row strong {
  color: var(--ink);
  font-size: 1.24rem;
}

.score-row strong.is-bumped {
  animation: score-bump 260ms ease-out;
}

.board-2048 {
  display: grid;
  grid-template-columns: repeat(var(--board-size, 4), minmax(0, 1fr));
  grid-template-rows: repeat(var(--board-size, 4), minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 410px);
  aspect-ratio: 1;
  border-radius: 8px;
  padding: 10px;
  background: #9d8b7a;
}

.board-2048:focus-visible {
  outline: 4px solid rgba(27, 138, 122, 0.35);
  outline-offset: 4px;
}

.tile-2048 {
  display: grid;
  place-items: center;
  min-width: 0;
  border-radius: 6px;
  background: #cbbcac;
  color: #2f2c28;
  font-size: clamp(1.15rem, 4vw, 2rem);
  font-weight: 900;
}

.board-2048[data-size="5"] .tile-2048 {
  font-size: clamp(0.9rem, 3vw, 1.55rem);
}

.board-2048[data-size="3"] .tile-2048 {
  font-size: clamp(1.4rem, 5vw, 2.45rem);
}

.tile-2048.is-new {
  animation: tile-pop 220ms cubic-bezier(0.2, 0.9, 0.25, 1.35);
}

.tile-2048.is-merged {
  animation: tile-merge 280ms cubic-bezier(0.2, 0.9, 0.25, 1.25);
}

.tile-2048[data-value="2"] {
  background: #eee4da;
}

.tile-2048[data-value="4"] {
  background: #ede0c8;
}

.tile-2048[data-value="8"] {
  background: #f2b179;
  color: var(--white);
}

.tile-2048[data-value="16"] {
  background: #f59563;
  color: var(--white);
}

.tile-2048[data-value="32"] {
  background: #f67c5f;
  color: var(--white);
}

.tile-2048[data-value="64"] {
  background: #f65e3b;
  color: var(--white);
}

.tile-2048[data-value="128"],
.tile-2048[data-value="256"],
.tile-2048[data-value="512"] {
  background: var(--gold);
  color: var(--dark);
}

.tile-2048[data-value="1024"],
.tile-2048[data-value="2048"],
.tile-2048[data-value="4096"],
.tile-2048[data-value="8192"] {
  background: var(--teal);
  color: var(--white);
  font-size: clamp(1rem, 3.2vw, 1.65rem);
}

@keyframes tile-pop {
  0% {
    opacity: 0;
    transform: scale(0.45);
  }
  72% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes tile-merge {
  0% {
    transform: scale(0.82);
  }
  58% {
    transform: scale(1.16);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes score-bump {
  0% {
    transform: scale(1);
  }
  50% {
    color: var(--teal);
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

.move-pad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 410px);
  margin-top: 12px;
}

.leaderboard-panel {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.leaderboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.leaderboard-header h4 {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--teal);
  font-size: 1.05rem;
  line-height: 1.2;
}

.leaderboard-header h4 small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.leaderboard-sync::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.leaderboard-sync[data-state="live"]::before {
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 138, 122, 0.12);
}

.leaderboard-sync[data-state="local"]::before,
.leaderboard-sync[data-state="error"]::before {
  background: var(--coral);
}

.player-field {
  display: grid;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.player-field input {
  width: 142px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
}

.player-field input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(27, 138, 122, 0.18);
}

.leaderboard-columns,
.leaderboard-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 72px 58px;
  gap: 8px;
  align-items: center;
}

.leaderboard-columns {
  padding: 0 8px 7px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.leaderboard-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  min-height: 42px;
  border-top: 1px solid rgba(31, 31, 31, 0.1);
  padding: 7px 8px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.leaderboard-list li:first-child {
  border-top-color: rgba(220, 168, 68, 0.5);
}

.leaderboard-rank {
  color: var(--gold);
  font-weight: 900;
}

.leaderboard-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-score,
.leaderboard-tile {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.leaderboard-empty {
  grid-template-columns: 1fr !important;
  color: var(--ink-soft);
  text-align: center;
}

.sudoku-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 430px);
  margin-bottom: 14px;
}

.sudoku-stats > span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(27, 138, 122, 0.08);
}

.sudoku-stats small {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.sudoku-stats strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.12rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sudoku-leaderboard-grid,
.sudoku-leaderboard-list li {
  grid-template-columns: 30px minmax(0, 1fr) 92px;
}

.sudoku-leaderboard-time {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  width: min(100%, 430px);
  aspect-ratio: 1;
  border: 3px solid var(--dark);
  background: var(--dark);
}

.sudoku-cell {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-align: center;
  font-size: clamp(1rem, 3.6vw, 1.38rem);
  font-weight: 800;
}

.sudoku-cell:nth-child(3n) {
  border-right-color: var(--dark);
}

.sudoku-cell:nth-child(n + 19):nth-child(-n + 27),
.sudoku-cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom-color: var(--dark);
}

.sudoku-cell.given {
  background: rgba(55, 90, 127, 0.12);
  color: var(--blue);
}

.sudoku-cell.error {
  background: rgba(216, 95, 67, 0.18);
}

.sudoku-cell:focus {
  outline: 3px solid rgba(27, 138, 122, 0.32);
  outline-offset: -3px;
}

.sudoku-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.game-status {
  min-height: 1.5em;
  margin-top: 12px !important;
  color: var(--ink-soft);
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .tile-2048.is-new,
  .tile-2048.is-merged,
  .score-row strong.is-bumped {
    animation: none;
  }
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 44px;
  align-items: start;
}

.contact-panel {
  border: 1px solid var(--dark);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  padding: 30px;
  background: var(--dark);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contact-panel p {
  margin: 0;
}

.contact-identity {
  display: grid;
  gap: 2px;
  margin-bottom: 24px;
}

.contact-identity strong {
  color: var(--white);
  font-size: 1.45rem;
  line-height: 1.2;
}

.contact-identity span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

.contact-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--gold);
  color: var(--dark);
  padding: 0 16px;
  font-weight: 800;
  word-break: break-word;
}

.contact-link:hover,
.contact-link:focus-visible {
  background: var(--teal);
}

.secondary-link {
  background: var(--blue);
  color: var(--white);
}

.github-link {
  background: var(--teal);
  color: var(--white);
}

.project-contact-link {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: transparent;
  color: var(--white);
}

.contact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.contact-tags span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 5%, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--gold);
  font-weight: 800;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .profile-grid,
  .section-heading,
  .subsection-title,
  .process-grid,
  .contact-layout,
  .detail-layout,
  .closing-panel {
    grid-template-columns: 1fr;
  }

  .scholarship-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .advantage-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .featured-projects {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 18px;
  }

  .brand-role {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .language-switch {
    grid-template-columns: repeat(2, 38px);
  }

  .hero {
    min-height: 86svh;
    padding: 104px 20px 40px;
    background-position: 30% center;
  }

  .hero-overlay {
    background: rgba(8, 14, 13, 0.82);
  }

  .hero-content {
    padding-left: 18px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .detail-hero {
    min-height: 74svh;
    padding: 104px 0 42px;
  }

  .detail-hero h1 {
    font-size: 2.7rem;
  }

  .lede {
    font-size: 1.08rem;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .quick-facts,
  .scholarship-grid,
  .advantage-grid,
  .summary-grid,
  .games-grid {
    grid-template-columns: 1fr;
  }

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

  .profile-signals > div,
  .profile-signals > div:first-child {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 16px 0;
  }

  .profile-signals > div:first-child {
    border-top: 0;
  }

  .game-card {
    padding: 18px;
  }

  .contact-panel {
    padding: 22px;
  }

  .game-card-header {
    flex-direction: column;
  }

  .difficulty-switch button {
    min-height: 48px;
    font-size: 0.78rem;
  }

  .score-row {
    gap: 6px;
  }

  .score-row > span {
    padding: 8px;
  }

  .leaderboard-header {
    align-items: stretch;
    flex-direction: column;
  }

  .player-field input {
    width: 100%;
  }

  .leaderboard-columns,
  .leaderboard-list li {
    grid-template-columns: 26px minmax(0, 1fr) 60px 48px;
    gap: 6px;
  }

  .sudoku-leaderboard-grid,
  .sudoku-leaderboard-list li {
    grid-template-columns: 26px minmax(0, 1fr) 84px;
  }

  .section {
    padding: 64px 0;
  }

  .section h2 {
    font-size: 2rem;
  }

  .process-list li {
    grid-template-columns: 1fr;
  }

  .experience-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .experience-label {
    justify-content: flex-start;
  }

  .step {
    grid-row: auto;
  }

  .site-footer {
    flex-direction: column;
  }
}
