@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --surface: #0b0b12;
  --panel: #13131e;
  --line: #282634;
  --ink: #f4f2f9;
  --muted: #b3b0c1;
  --accent: #bba4ff;
  --header-height: 67px;
  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: "Geist", system-ui, sans-serif;
  background: var(--surface);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
main { min-height: calc(100vh - var(--header-height) - 104px); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
button[hidden], [hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { color: #141021; background: var(--accent); }
.shell { width: min(100% - 96px, 1216px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 10px; left: 10px; padding: 12px; background: var(--panel); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  background: rgb(11 11 18 / 88%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #211e2c;
}
.header-inner {
  min-height: var(--header-height);
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
}
.brand { width: max-content; font-family: var(--display); font-size: 1.52rem; font-weight: 800; letter-spacing: -.07em; }
.brand span, h2 > span, .reading-header h1 > span { color: var(--accent); }
.header-inner nav { display: flex; gap: clamp(17px, 4vw, 47px); }
.header-inner nav a, .header-github, .footer-inner > a:last-child { color: var(--muted); font-size: .9rem; font-weight: 560; }
.header-github, .footer-inner > a:last-child { display: inline-flex; gap: 5px; align-items: center; }
.header-github { justify-self: end; }
.header-inner a:hover, .footer-inner a:hover { color: var(--ink); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #090911;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.45fr);
  align-items: center;
  min-height: clamp(490px, 52vw, 690px);
  padding-block: 32px 44px;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 {
  color: #f6f4fc;
  font-size: clamp(4.5rem, 9.8vw, 9.15rem);
  font-weight: 800;
  letter-spacing: -.052em;
  line-height: .87;
  text-wrap: wrap;
}
.hero h1 em {
  display: inline-block;
  padding: 0 .12em .12em .015em;
  color: #c9bbf5;
  background: linear-gradient(117deg, #f5e9ff 8%, #c4b2ff 52%, #aebfff 94%);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 1.13em;
  font-weight: 400;
  letter-spacing: -.057em;
  line-height: .79;
}
.hero-actions { margin-top: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 47px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 650;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.button:active { transform: scale(.98); }
.button-primary { color: #171025; background: #c9b3ff; }
.button-primary:hover { background: #e3d5ff; }
.hero-link {
  background: #141321;
  color: #e7dcff;
  border-color: #49405d;
  padding-inline: 17px;
}
.hero-link:hover { background: #272034; border-color: var(--accent); }
.button-outline { border-color: #514665; color: #e5d8ff; }
.button-outline:hover { border-color: #c9b3ff; background: #252035; }

.hero-art {
  position: relative;
  width: 100%;
  align-self: stretch;
  min-width: 0;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -12%;
  background:
    radial-gradient(ellipse at 68% 41%, #19264287, transparent 49%),
    radial-gradient(ellipse at 49% 66%, #25164383, transparent 49%);
  pointer-events: none;
}
#hero-particles {
  display: block;
  width: min(122%, 1020px);
  aspect-ratio: 1.44;
  max-height: 590px;
  mask-image: linear-gradient(90deg, transparent, #000 14% 88%, transparent);
  pointer-events: none;
}
.work-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: #12111b;
}
.work-filters button {
  min-height: 40px;
  padding: 6px 14px;
  border: 0;
  border-radius: 19px;
  background: transparent;
  color: var(--muted);
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.work-filters button:hover { color: var(--ink); background: #211b30; }
.work-filters button[aria-pressed="true"] { color: #f2eaff; background: #32264a; }
.section { margin-bottom: 91px; scroll-margin-top: calc(var(--header-height) + 25px); }
.section-heading {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px 35px;
  flex-wrap: wrap;
  padding-top: 28px;
  margin-bottom: 24px;
}
.section h2 {
  font-size: clamp(2.25rem, 4.7vw, 3.9rem);
  font-weight: 780;
  line-height: .98;
  letter-spacing: -.048em;
}
.section-heading > p, .about-section p { color: var(--muted); font-size: 1rem; line-height: 1.65; }

.projects { display: grid; grid-template-columns: 1.27fr 1fr 1fr; gap: 16px; }
.project-card { min-width: 0; }
.project-card a {
  display: flex;
  height: 100%;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 21px;
  overflow: hidden;
  transition: transform .28s, border-color .28s, box-shadow .28s;
}
.project-card a:is(:hover,:focus-visible) { transform: translateY(-4px); border-color: #77639a; box-shadow: 0 12px 35px #0005; }
.project-art { position: relative; height: 192px; overflow: hidden; isolation: isolate; }
.project-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, #10101960);
}
.art-reasonnav { background: #111e21; }
.art-reasonnav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 61%;
  display: block;
  transition: transform .55s;
}
.project-card a:hover img { transform: scale(1.045); }
.art-book {
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 48% 80%, #683f50, #302333 68%, #251c2d);
  perspective: 560px;
}
.book-sheet {
  position: absolute;
  width: 51%;
  height: 54%;
  border: 1px solid #ecb2be8c;
  border-radius: 10px;
  background: linear-gradient(132deg, #c98d9c, #5b374b 128%);
  box-shadow: 0 13px 28px #160e21a0;
  transform: rotate(-17deg) skewX(-11deg) translate(-4%, 14%);
  transition: transform .35s ease-out;
  display: grid;
  align-content: center;
  gap: 9%;
  padding: 14%;
}
.book-sheet:nth-child(2) { transform: rotate(-8deg) skewX(-11deg) translate(1%, -4%); background: linear-gradient(132deg, #d39cad, #76435b 122%); }
.book-sheet:last-child { transform: rotate(3deg) skewX(-11deg) translate(4%, -21%); background: linear-gradient(132deg, #fed3d8, #a07198 130%); }
.book-sheet span { height: 2px; background: #f9dae0b8; border-radius: 3px; }
.book-sheet span:first-child { width: 49%; height: 4px; background: #673653b3; }
.book-sheet span:last-child { width: 65%; }
.project-card a:hover .book-sheet:last-child { transform: rotate(7deg) skewX(-11deg) translate(10%, -28%); }
.art-navida { background: radial-gradient(ellipse at center, #283a70, #1a2344 75%); perspective: 335px; }
.nav-grid {
  position: absolute;
  inset: 3% -10%;
  transform: rotateX(53deg) rotateZ(-22deg) scale(1.4);
  background-image: linear-gradient(#829cf144 1px, transparent 1px), linear-gradient(90deg, #829cf144 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse, black 19%, transparent 69%);
}
.nav-route {
  position: absolute;
  inset: 15% 19%;
  transform: rotateX(31deg) rotateZ(-16deg);
  transition: transform .35s;
}
.project-card a:hover .nav-route { transform: rotateX(25deg) rotateZ(-12deg) scale(1.06); }
.nav-route i { position: absolute; display: block; border-color: #b9caff; }
.nav-route i:nth-child(1) { left: 21%; top: 41%; width: 32%; height: 34%; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 9px; }
.nav-route i:nth-child(2) { left: calc(53% - 2px); top: 28%; width: 23%; height: 16%; border-top: 2px solid; border-left: 2px solid; border-radius: 9px 0 0; }
.nav-route i:nth-child(n+3) { width: 12px; height: 12px; border-radius: 50%; background: #c5d3ff; box-shadow: 0 0 0 6px #a7bffe46, 0 0 20px #b8cdff; transform: translate(-50%, -50%); }
.nav-route i:nth-child(3) { left: 21%; top: 74%; }
.nav-route i:nth-child(4) { left: 77%; top: 29%; }
.art-default { background: radial-gradient(ellipse at 42% 75%, #694c96, #27193f 66%); }

.card-body { position: relative; flex: 1; padding: 19px 49px 23px 20px; }
.entry-topic {
  color: #cbbaff;
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 550;
  letter-spacing: .067em;
  line-height: 1.4;
  text-transform: uppercase;
}
.card-body h3, .note h3 {
  font-size: clamp(1.48rem, 2.5vw, 2rem);
  font-weight: 760;
  letter-spacing: -.052em;
  line-height: 1.04;
  margin: 7px 0 9px;
}
.card-body > p:last-of-type, .note h3 + p { color: var(--muted); line-height: 1.62; }
.card-arrow, .note-arrow {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #ded0fa;
  border: 1px solid #4b405f;
  border-radius: 50%;
  transition: color .25s, background .25s, border .25s;
}
.card-arrow { position: absolute; right: 13px; top: 21px; }
.project-card a:hover .card-arrow, .note a:hover .note-arrow { color: #1a1026; background: #d4bdff; border-color: #d4bdff; }

.notes { border-top: 1px solid var(--line); }
.note { border-bottom: 1px solid var(--line); }
.note a { display: grid; grid-template-columns: 140px 1fr 35px; align-items: center; gap: 13px 24px; padding: 24px 5px; }
.note time, .reading-meta time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.note time { display: block; margin-top: 7px; }
.note h3 { margin-top: 0; }
.note a:hover h3 { color: #ddceff; }

.about-section {
  border: 1px solid #382c50;
  border-radius: 24px;
  padding: clamp(23px, 4vw, 58px);
  display: flex;
  align-items: center;
  gap: 20px 30px;
  flex-wrap: wrap;
  justify-content: space-between;
  background: radial-gradient(ellipse at 93% 90%, #2a1d43, transparent 70%), var(--panel);
}
.about-section p { margin-top: 10px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 103px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.reading-shell { width: min(100% - 48px, 835px); padding-top: 45px; padding-bottom: 85px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: .935rem; }
.back-link:hover, .reading-body a:hover { color: #fff; }
.reading-header { margin-top: clamp(32px, 7vw, 68px); margin-bottom: 35px; }
.reading-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.reading-header h1 {
  font-size: clamp(2.7rem, 7.7vw, 5.8rem);
  font-weight: 790;
  line-height: .94;
  letter-spacing: -.05em;
  margin: 17px 0 22px;
}
.reading-header p { color: #c9c3d6; max-width: 34em; font-size: clamp(1.16rem, 2.45vw, 1.52rem); line-height: 1.48; }
.reading .project-art { height: clamp(180px, 33vw, 335px); border-radius: 20px; }
.art-credit { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.reading-body { max-width: 66ch; margin: 40px auto 0; }
.reading-body section + section, .reading-body > p { margin-top: 31px; }
.reading-body h2 { margin-bottom: 12px; font-size: clamp(1.6rem, 4vw, 2.25rem); font-weight: 760; letter-spacing: -.042em; line-height: 1.08; }
.reading-body p, .reading-body li { color: #d3d0df; font-size: 1.075rem; line-height: 1.75; }
.reading-body p + p { margin-top: 14px; }
.reading-body a { color: #d1beff; text-decoration: underline; text-underline-offset: .22em; }
.reading-body a svg { vertical-align: middle; }
.sources { padding-top: 21px; border-top: 1px solid var(--line); }
.sources ul { margin: 0; padding-left: 19px; }

[data-reveal] { transition: opacity .55s ease-out, transform .55s ease-out; }
[data-reveal].awaiting-reveal:not(:focus-within) { opacity: 0; transform: translateY(16px); }

@media (max-width: 980px) {
  .shell { width: min(100% - 54px, 1216px); }
  .project-art { height: 155px; }
  .card-body { padding-right: 18px; }
  .card-arrow { display: none; }
}
@media (max-width: 700px) {
  :root { --header-height: 58px; }
  .shell { width: calc(100% - 38px); }
  .header-inner { gap: 10px; }
  .brand { font-size: 1.27rem; }
  .header-inner nav { gap: clamp(11px, 3.5vw, 22px); }
  .header-inner nav a, .header-github { font-size: .875rem; }
  .header-github svg { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 40px 27px; min-height: auto; }
  .hero h1 { font-size: clamp(3rem, 12vw, 5rem); line-height: .95; }
  .hero h1 br { display: none; }
  .hero h1 em { margin-left: .2em; }
  .hero-actions { margin-top: 9px; }
  .hero-art { margin-top: 4px; }
  #hero-particles { width: min(110%, 580px); aspect-ratio: 1.37; }
  .section { margin-bottom: 62px; }
  .section-heading { padding-top: 21px; gap: 9px 15px; }
  .projects { grid-template-columns: 1fr; gap: 13px; }
  .project-art { height: clamp(155px, 44vw, 245px); }
  .card-body { padding: 17px 55px 19px 17px; }
  .card-arrow { display: grid; right: 15px; }
  .note a { grid-template-columns: 1fr 31px; gap: 8px 10px; padding: 17px 2px; }
  .note-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px 13px; flex-wrap: wrap; }
  .note time { margin-top: 0; }
  .reading-shell { padding-top: 30px; }
}
@media (max-width: 345px) {
  .shell { width: calc(100% - 28px); }
  .button { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal].awaiting-reveal { opacity: 1; transform: none; }
}
