/* ==========================================================================
   Adarsh Chaudhary — portfolio, terminal edition
   Accents: CodeChef 5-star yellow + Codeforces Expert blue.
   Type: Martian Mono for anything the terminal would print, Archivo for prose.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #080A1A;
  --bg-raise: #0E1130;
  --bg-raise-2: #131740;
  --bg-deep: #05061A;
  --line: #262C5E;
  --line-soft: #1A1F49;

  --text: #E7E9F6;
  --text-soft: #B9BDDD;
  --muted: #868CB6;
  --dim: #7B81AD;

  --star: #FFBF00;
  --star-soft: rgb(255 191 0 / 0.35);
  --blue: #2A35F0;
  --blue-text: #9AA2FF;
  --ok: #4CD685;
  --err: #FF6B6B;
  --bronze: #E2A367;

  --mono: "Martian Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Archivo", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bar-h: 2.5rem;
  --gutter: 1rem;
  --max: 72rem;
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 1rem);
}

html.is-intro { overflow: hidden; }

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

body {
  margin: 0;
  padding-top: var(--bar-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; overflow-wrap: break-word; }
p, figure, blockquote, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue-text); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--text); text-decoration-color: var(--star); }

:focus-visible {
  outline: 2px solid var(--star);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--star); color: var(--bg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: calc(var(--bar-h) + 0.5rem);
  z-index: 60;
  padding: 0.5rem 0.875rem;
  background: var(--star);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip:focus { transform: none; }

.prompt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.875rem;
}

.prompt__sign { color: var(--star); }

.comment {
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ---------- Terminal progress bar ---------- */

.termbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  height: var(--bar-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--line-soft);
  background: rgb(8 10 26 / 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.termbar__pct { flex: none; color: var(--star); }
.termbar__pct b { display: inline-block; min-width: 3ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.termbar__arrow { color: var(--ok); }

.termbar__path {
  display: flex;
  flex: none;
  min-width: 0;
}

.termbar__path a {
  color: var(--dim);
  text-decoration: none;
}

.termbar__path a + a::before { content: "/"; color: var(--dim); }
.termbar__path a.is-visited { color: var(--text-soft); }
.termbar__path a.is-current { color: var(--star); }
.termbar__path a:hover { color: var(--text); }

.termbar__path a.is-current::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--star);
  animation: blink 1.1s steps(1) infinite;
}

.termbar__track {
  display: grid;
  flex: 1;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 2px;
  min-width: 3rem;
  height: 0.625rem;
}

.termbar__track span {
  border-radius: 1px;
  background: var(--line-soft);
}

.termbar__track span.on { background: var(--star); }

.termbar__left { flex: none; color: var(--muted); }
.termbar__left b { font-weight: 500; font-variant-numeric: tabular-nums; }

.termbar__resume {
  flex: none;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--star-soft);
  border-radius: 3px;
  color: var(--star);
  text-decoration: none;
}
.termbar__resume:hover { border-color: var(--star); color: var(--star); }

@media (max-width: 47.99rem) {
  .termbar__left,
  .termbar__resume { display: none; }
  .termbar__path a { display: none; }
  .termbar__path a.is-current { display: inline; }
  .termbar__path a.is-current::before { content: "~/"; color: var(--dim); }
  .termbar__path a[data-section="top"].is-current::before { content: none; }
}

@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .termbar__path a.is-current::after { animation: none; }
}

/* ---------- Windows (shared frame) ---------- */

.window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-raise);
}

.window__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raise-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.4;
}

.window__bar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.window__bar > span:first-child::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 1px;
  background: var(--star);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 3rem;
  padding-block: 4rem 3rem;
}

.hero__name {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: clamp(2.4rem, 11vw, 5.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.type { position: relative; display: block; }
.type__ghost { visibility: hidden; }
.type__live { position: absolute; inset: 0; }

.type__live::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.82em;
  margin-left: 0.06em;
  vertical-align: -0.04em;
  background: var(--star);
  animation: blink 1.1s steps(1) infinite;
}

.type__live.is-typing::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .type__live::after { animation: none; }
}

.hero__lede {
  max-width: 36rem;
  margin-top: 1.75rem;
  color: var(--text-soft);
  font-size: 1.1875rem;
  line-height: 1.55;
}

.hero__lede strong { color: var(--text); font-weight: 650; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.875rem;
  padding: 0 1.125rem;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.btn--star { background: var(--star); color: var(--bg); }
.btn--star:hover { background: #FFD24D; color: var(--bg); }

.btn--line { box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn--line:hover { box-shadow: inset 0 0 0 1px var(--star); color: var(--text); }

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.hero__links a { color: var(--muted); }
.hero__links a:hover { color: var(--text); }

/* neofetch panel */
.fetch__body { padding: 1rem 1rem 1.125rem; }

.fetch__cmd {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.fetch__grid {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: 0.875rem;
  margin-top: 0.875rem;
  align-items: start;
}

.fetch__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}

.fetch__info {
  font-family: var(--mono);
  font-size: 0.71875rem;
  line-height: 1.75;
}

.fetch__info > div {
  display: grid;
  grid-template-columns: 6.25em minmax(0, 1fr);
  column-gap: 0.5em;
}

.fetch__info dt { color: var(--star); }
.fetch__info dd { color: var(--text-soft); }

.fetch__info .fetch__host {
  display: block;
  margin-bottom: 0.375rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px dashed var(--line);
}

.fetch__host dd { color: var(--text); }
.fetch__host b { color: var(--blue-text); font-weight: 600; }

.fetch__swatches {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
  height: 0.875rem;
  margin-top: 1rem;
}

.fetch__swatches i { border-radius: 1px; }
.fetch__swatches i:nth-child(1) { background: var(--bg-deep); box-shadow: inset 0 0 0 1px var(--line); }
.fetch__swatches i:nth-child(2) { background: var(--err); }
.fetch__swatches i:nth-child(3) { background: var(--ok); }
.fetch__swatches i:nth-child(4) { background: var(--star); }
.fetch__swatches i:nth-child(5) { background: var(--blue); }
.fetch__swatches i:nth-child(6) { background: var(--blue-text); }
.fetch__swatches i:nth-child(7) { background: var(--bronze); }
.fetch__swatches i:nth-child(8) { background: var(--text); }

@media (min-width: 30rem) {
  .fetch__grid { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.25rem; }
  .fetch__info { font-size: 0.78125rem; }
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    gap: 4rem;
    min-height: calc(100vh - var(--bar-h));
    min-height: calc(100svh - var(--bar-h));
    padding-block: 4rem;
  }
  .hero__name { font-size: clamp(3.5rem, 6.6vw, 5.5rem); }
  .fetch__body { padding: 1.25rem 1.25rem 1.375rem; }
  .fetch__grid { grid-template-columns: 9rem minmax(0, 1fr); }
}

/* ---------- Sections ---------- */

.section { padding-top: 6rem; }

.section__head { margin-bottom: 2.5rem; }

.sec-title {
  font-family: var(--mono);
  font-size: clamp(1.875rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.sec-title span { color: var(--dim); font-weight: 400; }

@media (min-width: 60rem) {
  .section { padding-top: 8rem; }
}

/* ---------- Work ---------- */

.job + .job { margin-top: 4rem; }

.job__head {
  display: grid;
  gap: 0.25rem 1.5rem;
}

.job__org {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.job__org a { color: var(--text); text-decoration: none; }
.job__org a:hover { text-decoration: underline; text-decoration-color: var(--star); text-decoration-thickness: 2px; }

.job__role { color: var(--text-soft); }

.job__when {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.75rem;
  color: var(--ok);
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgb(76 214 133 / 0.18);
}

@media (min-width: 40rem) {
  .job__head { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .job__org, .job__role { grid-column: 1; }
  .job__when { grid-column: 2; grid-row: 1; }
}

/* Tree: each item hangs off a vertical line like `tree` output. */
.tree { margin-top: 1.75rem; }

.tree__item {
  position: relative;
  padding: 0 0 1.75rem 1.75rem;
}

.tree__item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.375rem;
  border-left: 1px solid var(--line);
}

.tree__item:last-child { padding-bottom: 0; }
.tree__item:last-child::before { bottom: auto; height: 0.8rem; }

.tree__item::after {
  content: "";
  position: absolute;
  top: 0.8rem;
  left: 0.375rem;
  width: 0.875rem;
  border-top: 1px solid var(--line);
}

.tree__text h4 {
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.5;
}

.tree__text p {
  max-width: 38rem;
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.96875rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 1.25rem;
}

.badges li {
  padding: 0.2rem 0.6rem;
  border: 1px solid rgb(154 162 255 / 0.28);
  border-radius: 3px;
  background: rgb(42 53 240 / 0.14);
  color: var(--blue-text);
  font-family: var(--mono);
  font-size: 0.71875rem;
  line-height: 1.6;
}

.badges--metric { margin-top: 0.75rem; }

.badges--metric li {
  border-color: var(--star-soft);
  background: rgb(255 191 0 / 0.06);
  color: var(--text-soft);
}

.badges--metric b { color: var(--star); font-weight: 700; }

@media (min-width: 48rem) {
  .tree__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem;
  }
  .badges--metric {
    flex-direction: column;
    align-items: flex-end;
    margin-top: 0.125rem;
  }
}

.jobs-early {
  display: grid;
  gap: 1rem;
  margin-top: 4rem;
}

.job--early {
  padding: 1.25rem 1.25rem 1.375rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-raise);
}

.job + .jobs-early .job--early { margin-top: 0; }

.job--early .job__head { grid-template-columns: minmax(0, 1fr); }
.job--early .job__when { grid-column: 1; grid-row: auto; }
.job--early .job__org { font-size: 1.1875rem; }

.job--early > p {
  margin-top: 0.875rem;
  color: var(--text-soft);
  font-size: 0.96875rem;
}

.job--early .job__link {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

@media (min-width: 40rem) {
  .jobs-early { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Quotes */
.kudos { margin-top: 4.5rem; }

.kudos__title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
}

.quote {
  margin-top: 1.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--star);
}

.quote blockquote p {
  max-width: 40rem;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.45;
}

.quote figcaption {
  margin-top: 0.625rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.kudos__more {
  margin-top: 1.5rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

@media (min-width: 56rem) {
  .kudos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
  .kudos__title, .kudos__more { grid-column: 1 / -1; }
}

/* ---------- Skills ---------- */

.stack {
  padding: 1rem 1.125rem 1.125rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.85;
}

.stack::before,
.stack::after { display: block; color: var(--muted); }
.stack::before { content: "{"; }
.stack::after { content: "}"; }

.stack__row { padding-left: 2ch; }
.stack dt { color: var(--blue-text); }
.stack dt::after { content: ":"; color: var(--muted); }

.stack dd {
  display: flex;
  flex-wrap: wrap;
  padding-left: 2ch;
  color: var(--muted);
}

.stack dd::before { content: "["; }
.stack dd::after { content: "],"; }
.stack__row:last-child dd::after { content: "]"; }

.stack dd span { color: var(--star); }
.stack dd span:not(:last-child)::after { content: ",\00a0"; color: var(--muted); }

@media (min-width: 48rem) {
  .stack { padding: 1.25rem 1.5rem 1.375rem; font-size: 0.875rem; }
  .stack__row { display: grid; grid-template-columns: 17ch minmax(0, 1fr); }
  .stack dd { padding-left: 0; }
}

/* ---------- Projects ---------- */

.show {
  display: grid;
  gap: 1.75rem;
}

.show + .show { margin-top: 4.5rem; }

.show__caption {
  margin-top: 0.625rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.71875rem;
}

.show__when {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.show__text h3 {
  margin-top: 0.25rem;
  font-family: var(--mono);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.show__text > p:not(.show__when):not(.show__links) {
  max-width: 34rem;
  margin-top: 0.75rem;
  color: var(--text-soft);
}

.show__links {
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.show__links a { color: var(--star); }
.show__links a:hover { color: var(--text); }

@media (min-width: 56rem) {
  .show {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 3.5rem;
  }
  .show--flip .show__visual { order: 2; }
  .show + .show { margin-top: 6rem; }
}

/* Code panes */
.xlate { display: grid; gap: 0.5rem; }

.xlate__arrow {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.71875rem;
  text-align: center;
}

.code {
  margin: 0;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.65;
  tab-size: 4;
}

.code .k { color: var(--blue-text); }
.code .t { color: #CDB9FF; }
.code .f { color: var(--star); }
.code .s { color: var(--ok); }
.code .n { color: #FF9F7A; }

/* Game */
.game__hint { color: var(--muted); }

.game__canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  background: var(--bg-deep);
  cursor: crosshair;
  touch-action: pan-y;
}

.game__canvas:focus-visible { outline-offset: -3px; border-radius: 0; }

/* Leave portal mock */
.leave__body { padding: 0.375rem 0; }

.leave__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.leave__row:last-child { border-bottom: 0; }

.leave__row b {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.leave__row span:not(.pill) {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
}

.leave__row--admin { background: rgb(255 255 255 / 0.015); }
.leave__row--admin b { color: var(--blue-text); }

.leave__actions { display: flex; flex: none; gap: 0.375rem; }

.pill {
  flex: none;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.pill--ok { border-color: var(--ok); background: var(--ok); color: var(--bg); }
.pill--done { border-color: rgb(76 214 133 / 0.4); color: var(--ok); }

/* More projects */
.more { margin-top: 5rem; }

.more__list {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.more__item {
  display: grid;
  gap: 0.25rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.more__item h3 {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
}

.more__item p { color: var(--text-soft); font-size: 0.96875rem; }

@media (min-width: 48rem) {
  .more__item { grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; }
}

/* ---------- Contests ---------- */

.ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.rating {
  display: flex;
  flex-direction: column;
  min-height: 10rem;
  padding: 1.125rem;
  border-radius: 8px;
  text-decoration: none;
}

.rating--chef { background: var(--star); color: var(--bg); }
.rating--cf { background: var(--blue); color: #FFFFFF; }
.rating--chef:hover { color: var(--bg); }
.rating--cf:hover { color: #FFFFFF; }

.rating__site {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.rating:hover .rating__site { text-decoration: underline; text-underline-offset: 0.25em; }

.rating__rank {
  margin-top: auto;
  font-family: var(--mono);
  font-size: clamp(1.625rem, 7vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.rating__peak {
  margin-top: 0.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 40rem) {
  .ratings { gap: 1rem; }
  .rating { min-height: 12rem; padding: 1.5rem; }
}

.standings-window { margin-top: 1.5rem; }
.standings-scroll { overflow-x: auto; }

.standings {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96875rem;
}

.standings th {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.71875rem;
  font-weight: 500;
  text-align: left;
}

.standings td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-soft);
  vertical-align: baseline;
}

.standings tr:last-child td { border-bottom: 0; }
.standings td a { color: var(--text-soft); text-decoration-color: var(--line); }
.standings td a:hover { color: var(--text); text-decoration-color: var(--star); }

.standings .num {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.standings th.num { font-size: 0.71875rem; }

.standings .num b {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.standings .num b.medal { color: var(--bronze); }

.also {
  margin-top: 1.25rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* ---------- Education ---------- */

.schools { border-top: 1px solid var(--line); }

.school {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1.5rem;
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--line);
}

.school h3 {
  grid-column: 1;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.school h3 a { color: var(--text); text-decoration-color: var(--line); }
.school h3 a:hover { text-decoration-color: var(--star); }

.school p {
  grid-column: 1;
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.96875rem;
}

.school .school__when {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
}

.campus { max-width: 44rem; margin-top: 2rem; }
.campus p { color: var(--text-soft); font-size: 0.96875rem; }

.campus .campus__certs {
  margin-top: 1rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
}

/* ---------- Contact ---------- */

.contact {
  margin-top: 8rem;
  padding-block: 5rem 2rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-raise);
}

.contact__title { font-size: clamp(2.25rem, 8vw, 4.5rem); }

.contact__mail {
  margin-top: 2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: clamp(1rem, 3.6vw, 2rem);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.contact__mail a {
  color: var(--star);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.contact__mail a:hover { color: var(--text); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 2.25rem;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.contact__links a { color: var(--text-soft); }

.contact__fine {
  margin-top: 4.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.71875rem;
  line-height: 1.7;
}

/* ---------- Intro (fake judge run) ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: var(--bg);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.intro.is-done { opacity: 0; visibility: hidden; }

.intro__screen {
  width: min(100%, 38rem);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 2;
}

.intro__line { opacity: 0; }
.intro__line.is-on { opacity: 1; }
.intro__line--dim { color: var(--muted); }
.intro__dots::after { content: "..."; color: var(--dim); }

.intro .ok { color: var(--ok); }
.intro .err { color: var(--err); }

.intro__verdict {
  margin-top: 0.75rem;
  color: var(--ok);
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.intro__skip {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  cursor: pointer;
}

.intro__skip:hover { border-color: var(--star); color: var(--text); }

@media (min-width: 48rem) {
  .intro__screen { font-size: 0.875rem; }
}
