@font-face {
  font-family: "Fraunces DXIR";
  src: url("/assets/font-display.7f9d191d9993.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex DXIR";
  src: url("/assets/font-body.e2291e842cf5.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --ink: #171713;
  --ink-soft: #24231d;
  --paper: #f3ead7;
  --paper-muted: #c9c0ae;
  --gold: #f0b94c;
  --gold-soft: #d99236;
  --mint: #38d6b3;
  --line: rgba(243, 234, 215, 0.18);
  --glass: rgba(20, 20, 17, 0.72);
  --font-display: "Fraunces DXIR", "Songti SC", "STSong", serif;
  --font-body: "IBM Plex DXIR", "Microsoft YaHei", "PingFang SC", sans-serif;
  --shell: min(1240px, calc(100vw - 64px));
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 280px;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  color: var(--ink);
  background: var(--mint);
  border-radius: 999px;
}

.skip-link:focus-visible {
  width: auto;
  height: auto;
  padding: 10px 16px;
  overflow: visible;
  clip-path: none;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #2a281f;
}

.site-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.52);
  transform: scale(1.03);
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 18%, rgba(240, 185, 76, 0.26), transparent 32%),
    radial-gradient(circle at 13% 75%, rgba(56, 214, 179, 0.12), transparent 28%),
    linear-gradient(105deg, rgba(16, 16, 13, 0.92) 0%, rgba(16, 16, 13, 0.72) 52%, rgba(16, 16, 13, 0.52) 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.035) 5px 6px),
    repeating-linear-gradient(90deg, transparent 0 5px, rgba(255, 255, 255, 0.025) 5px 6px);
  mix-blend-mode: soft-light;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: var(--shell);
  min-height: 92px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50% 50% 50% 12%;
  font: 750 22px/1 var(--font-display);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-copy strong {
  letter-spacing: 0.12em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--paper-muted);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.site-nav {
  display: flex;
  gap: 30px;
}

.site-nav a {
  position: relative;
  color: var(--paper-muted);
  font-size: 13px;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  min-height: calc(100svh - 92px);
  display: grid;
  grid-template-columns: minmax(310px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(56px, 8vw, 126px);
  padding-block: 72px 110px;
}

.portrait-stage {
  position: relative;
  justify-self: center;
  width: min(100%, 390px);
  min-height: 520px;
  display: grid;
  place-items: center;
}

.portrait-stage::before {
  content: "";
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid rgba(240, 185, 76, 0.58);
  border-radius: 50%;
}

.portrait-stage::after {
  content: "";
  position: absolute;
  width: 56%;
  height: 86%;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: rotate(24deg);
}

.portrait {
  position: relative;
  z-index: 2;
  width: min(74vw, 292px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50% 50% 46% 54%;
  background: #090909;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5);
  transform: rotate(-3deg);
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.portrait-orbit {
  position: absolute;
  z-index: 3;
  top: 42px;
  right: 0;
  width: 106px;
  height: 106px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--ink);
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 12px 40px rgba(56, 214, 179, 0.28);
}

.portrait-orbit span:first-child {
  font: 700 34px/1 var(--font-display);
}

.portrait-orbit span:last-child {
  margin-top: 6px;
  font-size: 7px;
  letter-spacing: 0.14em;
}

.portrait-caption {
  position: absolute;
  bottom: 26px;
  left: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--paper-muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portrait-caption span {
  width: 8px;
  height: 8px;
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(56, 214, 179, 0.12);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font: 720 clamp(72px, 9vw, 142px)/0.82 var(--font-display);
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.hero-copy h1 span {
  display: block;
  margin-bottom: 18px;
  color: var(--paper-muted);
  font: 500 clamp(19px, 2vw, 28px)/1.1 var(--font-body);
  letter-spacing: 0;
}

.hero-copy blockquote {
  max-width: 680px;
  margin: 42px 0 0;
  padding-left: 24px;
  border-left: 2px solid var(--gold);
  color: var(--paper);
  font: 420 clamp(20px, 2.1vw, 31px)/1.35 var(--font-display);
  font-variation-settings: "SOFT" 70, "WONK" 1;
}

.hero-intro {
  max-width: 640px;
  margin: 28px 0 0;
  color: var(--paper-muted);
  font-size: 15px;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-action,
.text-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.primary-action {
  min-width: 176px;
  min-height: 54px;
  padding: 12px 22px;
  color: var(--ink);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 2px 24px 2px 2px;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-action:hover {
  background: var(--mint);
  border-color: var(--mint);
  transform: translateY(-3px);
}

.text-action {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.hero-facts div {
  padding: 18px 22px 18px 0;
}

.hero-facts div + div {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.hero-facts dt {
  font: 650 28px/1 var(--font-display);
}

.hero-facts dd {
  margin: 7px 0 0;
  color: var(--paper-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.projects {
  padding-block: 120px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 60px;
}

.section-heading h2,
.closing h2 {
  margin: 0;
  font: 650 clamp(52px, 7vw, 100px)/0.92 var(--font-display);
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: var(--paper-muted);
  font-size: 14px;
}

.filter-bar {
  margin-top: 62px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-bar button {
  min-height: 42px;
  padding: 9px 14px;
  color: var(--paper-muted);
  background: rgba(18, 18, 15, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.filter-bar button span {
  margin-left: 9px;
  color: var(--paper-muted);
  font-size: 9px;
}

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

.filter-bar button[aria-pressed="true"] span {
  color: rgba(23, 23, 19, 0.68);
}

.filter-status {
  margin: 14px 0 0;
  color: var(--paper-muted);
  font-size: 11px;
}

.project-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  --card-accent: var(--gold);
  position: relative;
  min-height: 340px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(243, 234, 215, 0.09), rgba(243, 234, 215, 0.025)),
    rgba(20, 20, 17, 0.72);
  border: 1px solid var(--line);
  border-radius: 3px 34px 3px 3px;
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: transform 240ms ease, border-color 240ms ease, background 240ms ease;
}

.project-card[data-category="data"] {
  --card-accent: var(--mint);
}

.project-card[data-category="education"] {
  --card-accent: var(--gold);
}

.project-card[data-category="practice"] {
  --card-accent: #e87946;
}

.project-card[data-category="personal"] {
  --card-accent: #e8d7ad;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 1px;
  background: var(--card-accent);
}

.project-card::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -100px;
  width: 220px;
  height: 220px;
  border: 1px solid color-mix(in srgb, var(--card-accent) 34%, transparent);
  border-radius: 50%;
  transition: transform 320ms ease, background 320ms ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--card-accent) 58%, transparent);
  background:
    linear-gradient(135deg, rgba(243, 234, 215, 0.13), rgba(243, 234, 215, 0.035)),
    rgba(20, 20, 17, 0.8);
}

.project-card:hover::after {
  transform: scale(1.18);
  background: color-mix(in srgb, var(--card-accent) 7%, transparent);
}

.card--7 { grid-column: span 7; }
.card--6 { grid-column: span 6; }
.card--5 { grid-column: span 5; }
.card--4 { grid-column: span 4; }
.card--3 { grid-column: span 3; }

.card-index {
  position: absolute;
  top: 20px;
  right: 24px;
  color: rgba(243, 234, 215, 0.14);
  font: 650 60px/1 var(--font-display);
}

.card-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--paper-muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-meta span:last-child {
  padding: 4px 8px;
  color: var(--ink);
  background: var(--card-accent);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.card-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-block: auto;
  padding-block: 54px 38px;
}

.card-copy h3 {
  margin: 0;
  font: 610 clamp(27px, 3vw, 43px)/1.05 var(--font-display);
  letter-spacing: -0.025em;
}

.card-copy p {
  max-width: 570px;
  margin: 18px 0 0;
  color: var(--paper-muted);
  font-size: 13px;
}

.card-link {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.project-card[hidden] {
  display: none;
}

.closing {
  padding-block: 130px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  border-top: 1px solid var(--line);
}

.closing .eyebrow {
  grid-column: 1 / -1;
}

.closing a {
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  gap: 6px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
  transition: transform 220ms ease, background 220ms ease;
}

.closing a:hover {
  background: var(--mint);
  transform: rotate(-7deg) scale(1.04);
}

.site-footer {
  min-height: 110px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--paper-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0;
}

.site-footer p:last-child {
  text-align: right;
}

.site-footer a {
  text-decoration: none;
}

.external-mark {
  color: var(--mint);
}

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 5px;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project-grid .reveal:nth-child(2n) { transition-delay: 70ms; }
.project-grid .reveal:nth-child(3n) { transition-delay: 120ms; }

@media (max-width: 1040px) {
  :root {
    --shell: min(100% - 44px, 920px);
  }

  .hero {
    grid-template-columns: 0.7fr 1fr;
    gap: 48px;
  }

  .portrait-stage {
    min-height: 430px;
  }

  .portrait-orbit {
    top: 20px;
  }

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

  .project-card {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 32px, 620px);
  }

  .site-header {
    min-height: 76px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 11px;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 26px;
    padding-block: 54px 84px;
  }

  .portrait-stage {
    width: min(100%, 390px);
    min-height: 360px;
  }

  .portrait {
    width: min(68vw, 250px);
  }

  .portrait-orbit {
    top: 4px;
    right: 2%;
    width: 88px;
    height: 88px;
  }

  .portrait-caption {
    bottom: 2px;
  }

  .hero-copy h1 {
    font-size: clamp(65px, 22vw, 100px);
  }

  .hero-copy blockquote {
    margin-top: 34px;
    font-size: 21px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hero-facts div {
    padding: 15px 10px 15px 0;
  }

  .hero-facts div + div {
    padding-left: 10px;
  }

  .projects {
    padding-block: 88px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .filter-bar {
    margin-top: 42px;
  }

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

  .project-card {
    min-height: 315px;
    padding: 24px;
  }

  .closing {
    padding-block: 92px;
    grid-template-columns: 1fr;
  }

  .closing a {
    width: 108px;
    height: 108px;
  }

  .site-footer {
    padding-block: 30px;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .site-footer p:last-child {
    text-align: left;
  }
}

@media (max-width: 380px) {
  :root {
    --shell: calc(100% - 24px);
  }

  .site-nav a:first-child {
    display: none;
  }

  .portrait-stage {
    min-height: 328px;
  }

  .portrait-orbit {
    width: 76px;
    height: 76px;
  }

  .portrait-orbit span:first-child {
    font-size: 27px;
  }

  .hero-copy h1 {
    font-size: 68px;
  }

  .hero-copy blockquote {
    font-size: 19px;
  }

  .hero-facts dt {
    font-size: 23px;
  }

  .hero-facts dd {
    font-size: 8px;
  }

  .filter-bar button {
    padding-inline: 11px;
  }

  .project-card {
    min-height: 300px;
  }

  .card-copy {
    padding-block: 48px 30px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
