:root {
  --ink: #111111;
  --ink-soft: #373737;
  --muted: #6b6b6b;
  --line: #d8d8d3;
  --surface: #ffffff;
  --paper: #f6f6f2;
  --panel: #efeee8;
  --signal: #b8322a;
  --signal-2: #0e6f73;
  --signal-3: #b28b28;
  --max: 1180px;
  --header: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
}

.opening-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.05) 0 1px, transparent 1px 20px),
    var(--surface);
  color: var(--ink);
  pointer-events: none;
  animation: opening-loader-exit 1350ms cubic-bezier(0.76, 0, 0.24, 1) 260ms forwards;
}

.opening-loader-inner {
  width: min(calc(100% - 48px), 620px);
  display: grid;
  gap: 14px;
}

.opening-loader-label,
.opening-loader-meta {
  display: block;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 850;
  animation: opening-copy-in 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.opening-loader-label {
  font-family: "Aptos Display", Aptos, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  line-height: 0.9;
}

.opening-loader-meta {
  color: var(--muted);
  font-size: 0.78rem;
  animation-delay: 160ms;
}

.opening-loader-line {
  position: relative;
  display: block;
  height: 1px;
  overflow: hidden;
  background: rgba(17, 17, 17, 0.14);
}

.opening-loader-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: opening-line 900ms cubic-bezier(0.76, 0, 0.24, 1) 120ms both;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 12px;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  padding: 12px clamp(16px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.home-page .site-header {
  animation: header-intro 640ms cubic-bezier(0.22, 1, 0.36, 1) 900ms both;
}

.brand {
  display: grid;
  gap: 2px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  text-decoration: none;
}

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

.site-nav a:hover::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header) - 72px);
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.home-page .hero-media {
  animation: hero-media-intro 1450ms cubic-bezier(0.22, 1, 0.36, 1) 500ms both;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: relative;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: clamp(72px, 14vw, 148px) 0 clamp(52px, 9vw, 92px);
  color: #fff;
}

.home-page .hero-content > * {
  animation: hero-copy-intro 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-page .hero-content h1 {
  animation-delay: 880ms;
}

.home-page .hero-subtitle {
  animation-delay: 1020ms;
}

.home-page .hero-lede {
  animation-delay: 1160ms;
}

.home-page .hero-actions {
  animation-delay: 1300ms;
}

.eyebrow,
.section-kicker,
.meta-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow,
.hero .meta-label {
  color: #dadad5;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: "Aptos Display", Aptos, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(4rem, 12vw, 10.25rem);
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: #181818;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 760px;
  margin: 24px 0 0;
  color: #efefec;
  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border: 1px solid currentColor;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 850;
}

.button-primary {
  background: #fff;
  color: var(--ink);
}

.button-secondary {
  color: #fff;
}

.button-dark {
  width: fit-content;
  margin-top: 22px;
  background: var(--ink);
  color: #fff;
}

.button-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.section-pad {
  padding: clamp(64px, 9vw, 128px) 0;
}

.intro-section {
  background: var(--paper);
}

.intro-grid,
.about-grid,
.split-heading,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 7vw, 90px);
  align-items: start;
}

.intro-photo-slot {
  aspect-ratio: 4 / 5;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.06) 0 1px, transparent 1px 18px),
    var(--surface);
}

.intro-photo-slot img,
.about-photo-slot img {
  height: 100%;
  object-fit: cover;
}

.intro-copy,
.about-copy,
.split-heading > p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
}

.intro-copy p,
.about-copy p {
  margin: 0 0 18px;
}

.feature-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.strip-grid span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
  text-align: center;
  text-transform: uppercase;
  font-size: 0.73rem;
  font-weight: 850;
}

.strip-grid span:last-child {
  border-right: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: clamp(32px, 5vw, 58px);
}

.section-heading > p:not(.section-kicker) {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.project-stack {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
}

.project-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.project-card-large:nth-child(even) .project-image {
  order: 2;
}

.project-image {
  min-height: 300px;
  background: #1a1a1a;
}

.project-image img {
  height: 100%;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 54px);
}

.project-body p {
  margin: 0;
  color: var(--ink-soft);
}

.project-body .lead {
  color: var(--ink);
  font-size: clamp(1.04rem, 1.5vw, 1.28rem);
  line-height: 1.35;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag-row span {
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
}

.inline-link {
  width: fit-content;
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 34px);
}

.project-grid .project-card {
  grid-template-columns: 1fr;
  min-height: 0;
}

.project-grid .project-image {
  aspect-ratio: 16 / 10;
  min-height: 0;
}

.project-grid .project-body {
  justify-content: start;
}

.project-card.compact .project-body {
  padding: clamp(22px, 3vw, 36px);
}

.subsection {
  margin-top: clamp(56px, 8vw, 100px);
}

.subsection-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}

.small-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.small-project-grid article {
  border: 1px solid var(--line);
  background: var(--surface);
}

.small-project-grid img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.small-project-grid article > :not(img) {
  margin-inline: 18px;
}

.small-project-grid h3 {
  margin-top: 6px;
  font-size: 1.12rem;
}

.small-project-grid p:last-child {
  margin-bottom: 22px;
  color: var(--ink-soft);
}

.experience {
  background: var(--ink);
  color: #fff;
}

.experience h2,
.experience h3,
.experience .meta-label {
  color: #fff;
}

.experience .section-kicker,
.experience .split-heading > p,
.experience article p {
  color: #d7d7d0;
}

.experience-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 7vw, 90px);
  align-items: end;
}

.experience-copy {
  max-width: 820px;
}

.experience-copy h2 {
  font-size: clamp(2.05rem, 3.8vw, 3.85rem);
  line-height: 1.02;
}

.experience-copy > p:not(.section-kicker) {
  max-width: 680px;
  margin: 18px 0 0;
  color: #d7d7d0;
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.55;
}

.experience-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(34px, 5vw, 58px);
}

.experience-card {
  display: grid;
  gap: 13px;
  min-height: 250px;
  padding: clamp(22px, 2.8vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.experience-card h3 {
  color: #fff;
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
}

.experience-card p {
  margin: 0;
  line-height: 1.55;
}

.about {
  background: var(--panel);
}

.about h2 {
  font-size: clamp(2rem, 4.5vw, 4rem);
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: stretch;
}

.education-panel,
.skills-panel,
.coursework {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(22px, 3vw, 34px);
}

.education-panel p {
  margin: 0 0 9px;
  color: var(--ink-soft);
}

.education-panel h3 {
  margin-bottom: 14px;
}

dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

dt {
  margin-bottom: 4px;
  font-weight: 850;
}

dd {
  margin: 0;
  color: var(--ink-soft);
}

.coursework {
  margin-top: 20px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.course-grid h3 {
  font-size: 1.05rem;
}

.course-grid ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.site-footer {
  padding: 42px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.site-footer h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  text-transform: uppercase;
}

.site-footer p {
  margin: 12px 0 0;
  color: var(--ink-soft);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 22px;
  align-self: center;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 850;
}

.site-footer a,
.site-footer span {
  text-underline-offset: 4px;
}

.hero-subtitle {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cfcfca;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.section-heading-row {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.project-link-card {
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-link-card:hover {
  border-color: #a8a8a0;
  transform: translateY(-3px);
}

.light-link {
  color: #ffffff;
}

.page-hero {
  padding: clamp(74px, 9vw, 118px) 0 clamp(46px, 6vw, 74px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.page-hero .wrap {
  display: grid;
  gap: 14px;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7.8vw, 6.7rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.page-hero p:not(.section-kicker) {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.06rem, 1.5vw, 1.28rem);
}

.about-hero h1 {
  max-width: 1120px;
  font-size: clamp(2.25rem, 6.3vw, 5.6rem);
  line-height: 1;
}

.page-section {
  scroll-margin-top: calc(var(--header) + 22px);
}

.alt-section {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.rule {
  width: 100%;
  height: 1px;
  margin: 26px 0;
  background: var(--line);
}

.about-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(32px, 6vw, 78px);
  align-items: start;
}

.about-main h2 {
  max-width: 780px;
}

.about-main p {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
}

.about-actions {
  margin-top: 32px;
}

.about-actions .button {
  flex: 0 0 240px;
  width: 240px;
  height: 56px;
  min-height: 56px;
  padding-block: 0;
  line-height: 1.15;
  text-align: center;
}

.about-actions .button-dark {
  margin-top: 0;
}

.about-sidebar,
.resume-sidebar {
  display: grid;
  gap: 2px;
}

.about-photo-slot {
  aspect-ratio: 4 / 5;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.06) 0 1px, transparent 1px 18px),
    var(--paper);
}

.about-extra-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.about-extra-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(17, 17, 17, 0.06) 0 1px, transparent 1px 18px),
    var(--paper);
}

.about-extra-photo img {
  height: 100%;
  object-fit: cover;
}

.about-sidebar-block {
  display: grid;
  gap: 10px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.about-sidebar-block h3 {
  font-size: 1rem;
}

.about-sidebar-block p {
  margin: 0;
  color: var(--ink-soft);
}

.about-sidebar-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.about-sidebar-block .button {
  width: fit-content;
}

.accent-fact {
  color: var(--signal) !important;
  font-weight: 850;
  text-transform: uppercase;
}

.exp-list-full {
  display: grid;
  gap: 2px;
}

.exp-full-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.3fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.exp-full-card aside {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
}

.exp-full-card aside p {
  margin: 0;
}

.exp-full-card > div {
  display: grid;
  gap: 14px;
}

.exp-full-card > div p {
  margin: 0;
  color: var(--ink-soft);
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
}

.resume-layout .education-panel,
.resume-layout .skills-panel,
.resume-layout .coursework {
  margin: 0;
}

.inner-heading {
  margin-top: clamp(42px, 6vw, 70px);
  margin-bottom: 20px;
}

body.is-page-entering main,
body.is-page-entering .site-footer {
  animation: page-fade-rise-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.is-page-exiting main,
body.is-page-exiting .site-footer {
  pointer-events: none;
  animation: page-fade-rise-out 220ms ease both;
}

@keyframes opening-loader-exit {
  0%,
  66% {
    opacity: 1;
    clip-path: inset(0);
    transform: translateY(0);
    visibility: visible;
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-12px);
    visibility: hidden;
  }
}

@keyframes opening-copy-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes opening-line {
  0% {
    transform: scaleX(0);
  }

  62% {
    transform: scaleX(1);
    transform-origin: left;
  }

  63% {
    transform: scaleX(1);
    transform-origin: right;
  }

  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

@keyframes header-intro {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-media-intro {
  from {
    opacity: 0;
    transform: scale(1.045);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hero-copy-intro {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes page-fade-rise-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes page-fade-rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 920px) {
  .intro-grid,
  .about-grid,
  .about-page-grid,
  .split-heading,
  .experience-overview,
  .footer-grid,
  .resume-grid,
  .resume-layout,
  .exp-full-card,
  .section-heading-row,
  .project-card,
  .project-card-large:nth-child(even) .project-image {
    grid-template-columns: 1fr;
  }

  .project-card-large:nth-child(even) .project-image {
    order: initial;
  }

  .project-grid,
  .experience-card-grid,
  .small-project-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

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

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  :root {
    --header: 68px;
  }

  .site-header {
    padding-inline: 14px;
  }

  .brand small {
    max-width: 170px;
  }

  .hero {
    min-height: calc(100svh - var(--header) - 48px);
  }

  .hero-content {
    padding-bottom: 44px;
  }

  h1 {
    font-size: clamp(3.25rem, 18vw, 5.5rem);
  }

  h2 {
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

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

  .strip-grid span {
    min-height: 58px;
    border-right: 1px solid var(--line);
  }

  .project-body {
    padding: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening-loader {
    display: none;
  }

  .home-page .site-header,
  .home-page .hero-media,
  .home-page .hero-content > *,
  body.is-page-entering main,
  body.is-page-entering .site-footer,
  body.is-page-exiting main,
  body.is-page-exiting .site-footer {
    animation: none;
  }
}
