:root {
  color-scheme: dark;
  --bg: #14121b;
  --panel: #1c1924;
  --paper: #f7f1ea;
  --muted: #bcb5c5;
  --orange: #ffa06d;
  --line: #3f394a;
  --mono: "Space Mono", monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "DM Sans", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font: 1rem/1.5 var(--body);
}
button,
a {
  font: inherit;
  color: inherit;
}
a {
  text-decoration: none;
}
button,
summary {
  cursor: pointer;
}
a:hover,
summary:hover {
  color: var(--orange);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 3px solid #c6aeff;
  outline-offset: 4px;
}
.skip {
  position: fixed;
  top: -80px;
  left: 10px;
  z-index: 9;
  background: white;
  color: black;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.wrap {
  width: min(1440px, 90%);
  margin: auto;
}
.mast {
  border-bottom: 1px solid var(--line);
  background: #15131c;
}
.nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.04em;
}
.brand img {
  width: 34px;
  margin-right: 0.5rem;
}
.nav nav,
.nav-contact {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav nav a,
.nav-contact {
  font-size: 0.88rem;
  font-weight: 600;
}
.nav-contact {
  border: 1px solid #716679;
  padding: 0.48rem 1rem;
  border-radius: 4px;
  gap: 0.65rem;
}
.nav-contact .narrow {
  display: none;
}
svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 78% 44%, #382843 0, transparent 47%),
    linear-gradient(105deg, #14121b 30%, #221b2b);
}
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#a798bf40 0.8px, transparent 0.9px);
  background-size: 13px 13px;
  mask-image: linear-gradient(to right, transparent, #000 62%);
}
.intro {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  align-items: center;
  gap: 2%;
  padding: clamp(46px, 5vw, 82px) 0 48px;
}
.kicker,
.section-note,
.hero-foot,
.instrument figcaption,
.axis,
.poster > span,
dt,
.honors span,
#chess-status {
  font: 400 0.77rem/1.5 var(--mono);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1.1rem;
}
.kicker i {
  width: 27px;
  height: 6px;
  background: repeating-linear-gradient(
    120deg,
    var(--orange) 0 2px,
    transparent 2px 5px
  );
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
.chess h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(5.4rem, 9.8vw, 10.1rem);
  line-height: 0.82;
  margin-left: -0.035em;
}
h1 span,
h2 span {
  color: var(--orange);
}
.lead {
  max-width: 42ch;
  color: #d0c9d6;
  font-size: clamp(1rem, 1.25vw, 1.24rem);
  margin: 1.65rem 0;
}
.actions,
.project-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
}
.actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.91rem;
  font-weight: 700;
}
.primary {
  background: var(--orange);
  color: #1d1514;
  padding: 0.82rem 1.2rem;
  border-radius: 3px;
}
.primary:hover {
  background: #ffc2a2;
  color: #211516;
}
.quiet svg {
  color: #c3b3dc;
}
.instrument {
  min-width: 0;
}
.scope {
  position: relative;
  aspect-ratio: 1.4;
  max-height: 500px;
  background:
    linear-gradient(
      90deg,
      transparent calc(50% - 0.5px),
      #c4aee329 50%,
      transparent calc(50% + 0.5px)
    ),
    linear-gradient(
      transparent calc(50% - 0.5px),
      #c4aee329 50%,
      transparent calc(50% + 0.5px)
    );
}
.corner {
  position: absolute;
  width: 17px;
  height: 17px;
  pointer-events: none;
  border-color: #9784a5;
  border-style: solid;
}
.tl {
  left: 0;
  top: 0;
  border-width: 1px 0 0 1px;
}
.br {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}
.axis {
  position: absolute;
  color: #ab99b9;
  font-size: 0.66rem;
  pointer-events: none;
}
.a1 {
  top: 0;
  left: 51%;
}
.a2 {
  right: 0;
  top: 51%;
}
.scope canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pinch-zoom;
  cursor: grab;
}
/* Phone: page scroll passes through the canvas until a tap unlocks orbiting. */
@media (pointer: coarse) {
  .scope canvas { touch-action: pan-y pinch-zoom; }
  .scope canvas.unlocked { touch-action: none; }
}
.scope canvas:active {
  cursor: grabbing;
}
.instrument figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #c6bbd1;
  margin-top: 12px;
  font-size: 0.68rem;
}
.instrument figcaption > span:first-child {
  margin-right: auto;
  letter-spacing: 0.12em;
}
.instrument figcaption button,
.chess button#reset {
  background: #26212f;
  border: 1px solid #5e526b;
  color: var(--paper);
  border-radius: 3px;
  padding: 0.33rem 0.6rem;
}
.hero-foot {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 14px 0 17px;
  color: #b9adc7;
  font-size: 0.7rem;
  border-top: 1px solid var(--line);
}
.hero-foot span:last-child {
  margin-left: auto;
}
.ticks {
  width: 48px;
  height: 9px;
  background: repeating-linear-gradient(
    90deg,
    #ba9f8e 0 1px,
    transparent 1px 4px
  );
}
.section {
  padding-block: clamp(48px, 5.2vw, 85px);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 1rem;
}
h2 {
  font-size: clamp(3.5rem, 5.8vw, 6rem);
  line-height: 0.95;
}
.section-note {
  color: var(--muted);
}
.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 26px;
}
.project {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.poster {
  flex: none;
  position: relative;
  height: clamp(190px, 19vw, 290px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.poster canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.poster > span {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #121017e6;
  color: #f5e9ef;
  border: 1px solid #ffffff45;
  padding: 0.25rem 0.55rem;
  border-radius: 2px;
}
.project-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 24px;
}
.project-text h3,
.profile h3,
.interests h3 {
  font: 700 clamp(1.7rem, 2.4vw, 2.6rem)/1.1 var(--display);
}
.project-text > p,
.project-text details p,
.aside,
.profile p,
dd,
.chess p,
.interests p {
  color: var(--muted);
}
.project-text > p {
  margin-top: 0.5rem;
}
.project-text details {
  margin: 1.15rem 0;
}
.project-text details p {
  padding-top: 0.6rem;
  max-width: 68ch;
}
.project-links {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}
.project-links a,
.aside a,
.footer-links a,
.email {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.aside {
  margin: 2rem 0 0;
  max-width: 78ch;
}
.profile {
  background: #201b2a;
  border-block: 1px solid var(--line);
}
.profile-grid,
.chess {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
}
.profile h3 {
  margin-bottom: 0.8rem;
}
.profile .degree {
  margin: 0;
  max-width: 42ch;
}
.degree-meta {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0.55rem 0 2.2rem;
  font: 0.83rem/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
}
.degree-meta span + span {
  border-left: 1px solid #6a596c;
  padding-left: 0.85rem;
}
.degree-meta strong {
  color: #f3d6bf;
}
.profile dl {
  margin: 0;
}
.profile dl > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.65fr) minmax(0, 1.6fr);
  gap: 1rem;
  border-top: 1px solid #ffffff1c;
  padding: 0.64rem 0;
}
.profile dt {
  color: #d8c4e6;
  margin: 0.13rem 0 0;
}
.profile dd {
  margin: 0;
  line-height: 1.55;
}
@media (max-width: 540px) {
  .profile dl > div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }
  .profile dt {
    margin: 0;
  }
}
.honors {
  list-style: none;
  padding: 0;
  margin: 0;
}
.honors li {
  padding: 0.9rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #52495a;
}
.honors span {
  color: #c8bdce;
  flex-shrink: 0;
  text-align: right;
}
.honors .win {
  color: var(--orange);
}
/* Experience reuses the Profile panel; share its divider and tighten dates. */
#experience {
  border-top: 0;
}
#experience .degree-meta {
  margin-bottom: 0.9rem;
}
.chess {
  background: linear-gradient(120deg, #342a40, #241d2b);
  padding: clamp(22px, 4vw, 60px);
  align-items: center;
  border: 1px solid #55465e;
}
.chess h3 {
  font-size: clamp(2.7rem, 4vw, 5rem);
  line-height: 0.95;
}
.chess p {
  margin: 1rem 0;
}
.chess .kicker {
  color: var(--orange);
}
#board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 350px);
  justify-self: center;
  border: 4px solid #695971;
}
.square {
  aspect-ratio: 1;
  padding: 0;
  min-width: 0;
  position: relative;
  background: #c6b6d0;
  color: #24192d;
  border: 0;
  display: grid;
  place-items: center;
  font: clamp(1.2rem, 3vw, 2.2rem)/1 serif;
}
.square.dark {
  background: #746883;
}
.square.move:after {
  content: "";
  width: 25%;
  height: 25%;
  border-radius: 100%;
  background: #432746;
  border: 2px solid #f4d7fc;
}
.square.goal {
  box-shadow: inset 0 0 0 3px #ed864a;
}
.square small {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font: 9px var(--mono);
  color: #19171b;
}
.square:disabled {
  opacity: 1;
  color: #211525;
  cursor: default;
}
.interests {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.interests img {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
}
.interests h3 {
  margin: 12px 0 6px;
  text-transform: capitalize;
}
.interests p {
  font-size: 0.94rem;
}
footer {
  border-top: 1px solid var(--line);
  background: #201a29;
}
footer h2 {
  font-size: clamp(4.3rem, 8vw, 8rem);
}
.email {
  display: inline-block;
  margin: 1.4rem 0;
  font-size: clamp(1.15rem, 2vw, 2rem);
}
.footer-links {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.footer-links a:last-child {
  margin-left: auto;
}
@media (max-width: 760px) {
  .wrap {
    width: 90%;
  }
  .nav {
    height: auto;
    min-height: 65px;
    flex-wrap: wrap;
    padding: 12px 0;
    row-gap: 10px;
  }
  .nav nav {
    gap: 1rem;
  }
  .brand span {
    display: none;
  }
  .nav-contact {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }
  .nav-contact .wide {
    display: none;
  }
  .nav-contact .narrow {
    display: inline;
  }
  .intro {
    grid-template-columns: 1fr;
    padding: 35px 0 20px;
    gap: 24px;
  }
  h1 {
    font-size: clamp(5.1rem, 15.6vw, 7.6rem);
  }
  .scope {
    aspect-ratio: 1.85;
  }
  .instrument {
    width: 100%;
  }
  .lead {
    margin: 1.2rem 0;
  }
  .section-head {
    margin-bottom: 20px;
  }
  .projects,
  .profile-grid,
  .chess {
    grid-template-columns: 1fr;
  }
  .profile-grid,
  .chess {
    gap: 25px;
  }
  .interests {
    grid-template-columns: 1fr 1fr;
  }
  .project-text {
    padding: 19px;
  }
  .section-note {
    font-size: 0.69rem;
  }
  .footer-links a:last-child {
    margin-left: 0;
  }
  .hero-foot {
    gap: 0.5rem;
  }
}
@media (max-width: 430px) {
  .nav {
    column-gap: 0.5rem;
  }
  .brand {
    gap: 0.2rem;
  }
  .brand img {
    width: 24px;
    margin-right: 2px;
  }
  .nav nav {
    gap: 0.65rem;
  }
  .nav nav a {
    font-size: 0.78rem;
  }
  .nav-contact svg {
    display: none;
  }
  .instrument figcaption {
    gap: 0.35rem;
    font-size: 0.59rem;
  }
  .interests {
    gap: 14px;
  }
  .section-note {
    max-width: 95px;
    text-align: right;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
#commands svg {
  width: 17px;
  height: 17px;
}
#commands {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  background: transparent;
  color: #cec4dc;
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 35px;
  padding: 0 0.55rem;
  font: 1.4rem/1 var(--body);
}
kbd {
  font: 0.68rem var(--mono);
}
dialog {
  color: var(--paper);
  background: #211c2a;
  border: 1px solid #827190;
  border-top: 3px solid var(--orange);
  padding: 24px;
  width: min(460px, 94vw);
  box-shadow: 0 20px 80px #09060b99;
}
dialog::backdrop {
  background: #0c0812c9;
  backdrop-filter: blur(6px);
}
.palette-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.palette-head h2 {
  font-size: 2.5rem;
}
.palette-head button,
.workflow select {
  background: #302638;
  color: var(--paper);
  border: 1px solid #756980;
  padding: 0.4rem 0.6rem;
}
dialog label,
.workflow label {
  display: block;
  font: 0.78rem var(--mono);
  margin-bottom: 7px;
}
dialog input {
  font: inherit;
  width: 100%;
  padding: 0.65rem;
  background: #16121c;
  color: var(--paper);
  border: 1px solid #766580;
}
#results {
  margin-top: 12px;
}
#results button {
  display: block;
  text-align: left;
  width: 100%;
  padding: 0.5rem;
  background: transparent;
  color: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
}
#results button:hover,
#results button:focus-visible {
  background: #493a50;
}
.workflow {
  margin-top: 16px;
  border-left: 2px solid var(--orange);
  padding: 5px 14px;
  background: #26212d;
}
.workflow select {
  font: inherit;
}
.workflow ol {
  font: 0.8rem/1.7 var(--mono);
  padding-left: 1.5rem;
  color: #e2c4af;
}
@media (max-width: 760px) {
  #commands kbd {
    display: none;
  }
  #commands {
    border: 0;
    min-height: 32px;
    min-width: 36px;
    padding: 0;
  }
  .nav-tools {
    gap: 0.2rem;
  }
}
@media (max-width: 400px) {
  .nav .brand {
    font-size: 0;
  }
  .nav .brand img {
    width: 27px;
  }
  .nav nav {
    gap: 0.65rem;
  }
}

/* Chess study and photographic prints. */
#elsewhere .chess {
  background:
    linear-gradient(
      90deg,
      #211928fa 5%,
      #211928ef 35%,
      #21192860 65%,
      #211928e6 98%
    ),
    url("assets/chess-study.webp") center 48% / cover;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.58fr);
  gap: 15%;
  border-color: #5c4b64;
}
.chess p {
  max-width: 37ch;
  color: #e5dce8;
}
.interests {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 50px);
  margin-top: clamp(30px, 4vw, 64px);
  align-items: start;
}
.print {
  background: #ede7dd;
  color: #231e23;
  padding: clamp(10px, 1vw, 16px);
  box-shadow: 0 8px 20px #0003;
}
.print:nth-child(2n) {
  transform: translateY(28px);
}
.print figcaption {
  padding: 4px 7px 7px;
}
.print > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.98;
  object-fit: cover;
}
.print .credit {
  border-top: 1px solid #34283628;
  padding-top: 0.65rem;
}

.print:first-child img {
  object-position: 50% 22%;
}
.print h3 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  letter-spacing: -0.025em;
  text-transform: none;
}
.print p {
  color: #4b4049;
  max-width: 60ch;
}
.credit {
  display: block;
  font: 0.75rem/1.5 var(--mono);
  margin-top: 14px;
}
.credit a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.print a:hover {
  color: #814324;
}
.puzzle-actions {
  display: flex;
  gap: 10px;
}
.puzzle-actions button {
  border: 1px solid #8d7897;
  border-radius: 3px;
  background: #2d2534;
  color: #fff;
  padding: 0.6rem 1rem;
  min-height: 44px;
}
.puzzle-actions button:disabled {
  opacity: 0.5;
}
.chess .move-line {
  font: 400 0.9rem/1.5 var(--mono);
  color: var(--orange);
  margin-bottom: 0.4rem;
}
.move-line:empty {
  display: none;
}
#chess-status {
  min-height: 2.8em;
  max-width: 42ch;
}
.square {
  font-family: "DejaVu Sans", "Segoe UI Symbol", "Apple Symbols", serif;
  font-size: clamp(1.3rem, 2.5vw, 2.4rem);
}
.square .white-piece {
  color: #fff7e7;
  -webkit-text-stroke: 0.8px #392a38;
  text-shadow: 0 1px 1px #251c26;
}
.square .black-piece {
  color: #291e30;
}
.square.selected {
  box-shadow: inset 0 0 0 3px #ff9459;
  background: #d9ad92;
}
.square.available:after {
  content: "";
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: #573b56;
  border: 1px solid #fcd9bc;
}
.square.available:has(span):after {
  inset: 2px;
  border: 3px solid #e18752;
  background: transparent;
}
.square small {
  font-size: 0.58rem;
  left: 2px;
  right: auto;
  bottom: 1px;
  line-height: 1;
}
@media (max-width: 760px) {
  #elsewhere .chess {
    grid-template-columns: 1fr;
    gap: 14px;
    background: #241d2b;
  }
  .chess > div:first-child {
    background:
      linear-gradient(90deg, #201827f0 0%, #201827b8 58%, #20182747),
      url("assets/chess-study.webp") right top / auto 100% no-repeat;
  }
  .chess #board {
    width: min(100%, 380px);
  }
  .square {
    font-size: clamp(1.4rem, 7vw, 2.3rem);
  }
  .interests {
    gap: 20px;
  }
  .print:nth-child(2n) {
    transform: none;
  }
  .instrument figcaption button,
  #commands {
    min-height: 40px;
  }
  .instrument figcaption button {
    min-width: 46px;
  }
}
@media (max-width: 540px) {
  .interests {
    grid-template-columns: 1fr;
  }
  .chess {
    padding: 18px 12px;
  }
  .chess > div:first-child {
    padding: 2px 5px;
  }
  .print h3 {
    margin: 10px 0 5px;
  }
  .print p {
    font-size: 1rem;
  }
  .scope {
    aspect-ratio: 1.76;
  }
  .hero .instrument figcaption {
    flex-wrap: wrap;
    row-gap: 5px;
  }
  .instrument figcaption > span:first-child {
    letter-spacing: 0.04em;
  }
  .hero .actions {
    gap: 1rem;
  }
  .print {
    content-visibility: auto;
    contain-intrinsic-size: auto 350px;
  }
}
.print {
  min-width: 0;
}
@media (max-width: 540px) {
  .interests {
    grid-template-columns: minmax(0, 1fr);
  }
  .print {
    contain-intrinsic-size: none auto 350px;
  }
}

::selection {
  background: #fac19c;
  color: #221723;
}
.project-text summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  list-style: none;
  font-weight: 600;
}
.project-text summary::-webkit-details-marker {
  display: none;
}
.project-text summary::before {
  content: "";
  border: solid var(--orange);
  border-width: 0 1.5px 1.5px 0;
  width: 6px;
  height: 6px;
  transform: rotate(-45deg);
  transition: transform 0.16s ease-out;
}
.project-text details[open] summary::before {
  transform: rotate(45deg);
}
.project-links a,
.footer-links a,
.aside a,
.email {
  text-decoration-thickness: 1px;
  text-decoration-color: #948394;
  text-underline-offset: 0.23em;
}
.project-links a:hover,
.footer-links a:hover,
.aside a:hover,
.email:hover {
  text-decoration-color: currentColor;
}
.section-head h2,
.print h3 {
  text-wrap: balance;
}
.hero .lead,
.project-text p,
.chess p,
.print p {
  text-wrap: pretty;
}
.square:focus-visible {
  outline: 2px solid #ffb482;
  outline-offset: -3px;
  z-index: 1;
}
:where(.puzzle-actions, .instrument figcaption) button:not(:disabled):active {
  transform: translateY(1px);
}
@media (hover: hover) {
  :where(.puzzle-actions, .instrument figcaption) button:not(:disabled):hover {
    border-color: #dbc1b9;
    color: #ffe5cf;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-text summary::before {
    transition: none;
  }
}
