/* rorosharma.me */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2-variations"),
       url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f6f8;
  --paper-raised: #ffffff;
  --ink: #121722;
  --graphite: #566070;
  --rule: #d5dae1;
  --accent: #2747f5;
  --accent-tint: #e6eafe;

  --wrap: 1120px;
  --gutter: 24px;

  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1.0625rem; /* 17px */
  --text-md: 1.3125rem;  /* 21px */
  --text-lg: 1.75rem;    /* 28px */
  --text-xl: 2.25rem;    /* 36px */

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1220;
    --paper-raised: #141b2c;
    --ink: #e9edf4;
    --graphite: #a0a9b9;
    --rule: #263048;
    --accent: #8a9bff;
    --accent-tint: #1b2440;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--graphite);
}

a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3,
p,
ul,
ol,
figure,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 24px 0;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav ul {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--graphite);
}

.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

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

.hero {
  padding: 40px 0 16px;
}

.hero h1 {
  font-size: clamp(3.25rem, 9vw, 6rem);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 28px;
  max-width: 42ch;
  font-size: var(--text-lg);
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

/* ---------- Results ---------- */

.results {
  padding: 40px 0 72px;
}

.results h2 {
  font-size: var(--text-md);
  font-weight: 650;
  margin-bottom: 8px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table caption {
  text-align: left;
}

.results-table tr {
  border-top: 1px solid var(--rule);
}

.results-table tr:last-child {
  border-bottom: 1px solid var(--rule);
}

.results-table th,
.results-table td {
  text-align: left;
  vertical-align: middle;
  padding: 14px 0;
  font-weight: inherit;
}

.results-table .place {
  width: 180px;
  padding-right: 24px;
  color: var(--accent);
  font-size: clamp(3.5rem, 8vw, 5.75rem);
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ord {
  font-size: 0.36em;
  font-weight: 700;
  font-stretch: 75%;
  letter-spacing: 0;
  vertical-align: top;
  position: relative;
  top: 0.32em;
  margin-left: 0.04em;
}

.ord-pre {
  margin-left: 0;
  margin-right: 0.08em;
}

.results-table .event a {
  font-size: var(--text-md);
  font-weight: 650;
  text-decoration: none;
}

.results-table .event a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.results-table .event span {
  display: block;
  color: var(--graphite);
  font-size: var(--text-base);
}

.results-table .when {
  width: 150px;
  text-align: right;
  color: var(--graphite);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .results-table tbody tr {
    animation: settle 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 80ms + 120ms);
  }

  @keyframes settle {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

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

.section {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 40px;
}

.section h2 {
  font-size: var(--text-xl);
  font-weight: 750;
  font-stretch: 110%;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.section-intro {
  margin-top: 10px;
  color: var(--graphite);
  max-width: 52ch;
}

/* ---------- Filter ---------- */

.filter {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.js .filter {
  display: flex;
}

.filter button {
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 7px 12px;
  cursor: pointer;
}

.filter button:hover {
  border-color: var(--graphite);
}

.filter button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.filter-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.project {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 8px 40px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}

.project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project[hidden] {
  display: none;
}

.figure {
  padding-top: 2px;
}

.figure b {
  display: block;
  font-size: 3.25rem;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.figure span {
  display: block;
  margin-top: 8px;
  max-width: 19ch;
  color: var(--graphite);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.project-body {
  max-width: 68ch;
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 24px;
}

.project h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  font-stretch: 105%;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.project time,
.project .date {
  color: var(--graphite);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.context {
  margin-top: 4px;
  color: var(--graphite);
}

.summary {
  margin-top: 14px;
}

.points {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.points li {
  position: relative;
  padding-left: 20px;
}

.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.stack {
  margin-top: 16px;
  color: var(--graphite);
  font-size: var(--text-sm);
}

.links {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-weight: 550;
}

.note {
  margin-top: 10px;
  color: var(--graphite);
  font-size: var(--text-sm);
  font-style: italic;
}

/* ---------- Experience ---------- */

.roles {
  display: grid;
}

.role {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4px 40px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}

.role:first-child {
  border-top: 0;
  padding-top: 0;
}

.role h3 {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.25;
}

.role .date {
  display: block;
  margin-top: 4px;
  color: var(--graphite);
  font-size: var(--text-sm);
}

.role-title {
  font-weight: 600;
}

.role p:not(.role-title) {
  margin-top: 4px;
  max-width: 68ch;
}

/* ---------- About, awards, education ---------- */

.split {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px 40px;
}

.split + .split {
  margin-top: 56px;
}

.split h2 {
  font-size: var(--text-lg);
}

.prose {
  max-width: 64ch;
  font-size: var(--text-md);
  line-height: 1.45;
}

.prose p + p {
  margin-top: 16px;
}

.awards {
  display: grid;
  gap: 12px;
  max-width: 68ch;
}

.awards li {
  position: relative;
  padding-left: 20px;
}

.awards li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.schools {
  display: grid;
  gap: 24px;
  max-width: 68ch;
}

.school h3 {
  font-size: var(--text-md);
  font-weight: 700;
}

.school .date {
  color: var(--graphite);
  font-size: var(--text-sm);
}

.school p {
  margin-top: 4px;
}

.toolkit {
  display: grid;
  gap: 10px;
  max-width: 72ch;
}

.toolkit div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.toolkit dt {
  color: var(--graphite);
}

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

.contact .lede {
  margin-top: 16px;
  max-width: 40ch;
}

.contact-email {
  display: inline-block;
  margin-top: 28px;
  font-size: clamp(1.5rem, 4.4vw, 2.75rem);
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: -0.025em;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}

.contact .hero-links {
  margin-top: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  color: var(--graphite);
  font-size: var(--text-sm);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
  }

  .wordmark {
    display: none;
  }

  .site-header .wrap {
    justify-content: flex-start;
  }

  .site-nav ul {
    gap: 18px;
  }

  .hero {
    padding-top: 32px;
  }

  .lede {
    font-size: var(--text-md);
  }

  .results-table,
  .results-table tbody {
    display: block;
  }

  .results-table tr {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 14px;
    align-items: center;
    padding: 14px 0;
  }

  .results-table th,
  .results-table td {
    padding: 0;
  }

  .results-table .place {
    width: auto;
    grid-row: span 2;
    font-size: 3.5rem;
    padding-right: 0;
  }

  .results-table .event a {
    font-size: 1.125rem;
  }

  .results-table .event span {
    font-size: var(--text-sm);
  }

  .results-table .when {
    width: auto;
    text-align: left;
    font-size: var(--text-sm);
  }

  .section {
    padding: 56px 0;
  }

  .section h2 {
    font-size: var(--text-lg);
  }

  .project,
  .role,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .figure {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .figure b {
    font-size: 2.5rem;
  }

  .figure span {
    margin-top: 0;
    max-width: none;
  }

  .project h3 {
    font-size: 1.5rem;
  }

  .prose {
    font-size: var(--text-base);
  }

  .toolkit div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
