:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #2d302e;
  --muted: #70746e;
  --line: #dedfd7;
  --accent: #ac4532;
  --soft: #eeeee7;
  --sans: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 36px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121212;
  --ink: #eceee5;
  --muted: #a1aaa0;
  --line: #3b443c;
  --accent: #f1a48b;
  --soft: #2b322b;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

::selection {
  background: #e5c8b7;
}

.page {
  max-width: 896px;
  padding: 0 36px;
  margin: auto;
}

.header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  height: 100px;
  gap: 32px;
}

.wordmark {
  font: 600 25px var(--sans);
  letter-spacing: -0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wordmark .header-duck {
  width: 21px;
  height: 24px;
  color: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.header nav {
  margin-left: auto;
  display: flex;
  gap: 27px;
  font-size: 14px;
  color: var(--muted);
}

.header nav a:hover,
.text-link:hover,
.socials a:hover {
  color: var(--accent);
}

#theme-toggle {
  background: none;
  border: 0;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}

#theme-toggle svg {
  width: 19px;
  height: 19px;
}

.skip {
  position: fixed;
  left: 24px;
  top: -70px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 10;
}

.skip:focus {
  top: 16px;
}

.hero {
  position: relative;
  padding: 85px 0 75px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.6px;
  font-weight: 550;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 {
  font: 600 64px/1.02 var(--sans);
  letter-spacing: -0.035em;
  margin: 25px 0 26px;
}

.name-dot {
  color: var(--accent);
}

.intro {
  font-size: 22px;
  line-height: 1.6;
  margin: 0 0 20px;
  letter-spacing: -0.3px;
}

.hero-note {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.hero-note a,
.about-copy p a,
.writing-footnote a,
.talk p a {
  text-decoration: underline;
  text-decoration-color: #b8bcb0;
  text-underline-offset: 4px;
}

.hero-note a:hover,
.about-copy p a:hover,
.writing-footnote a:hover,
.talk p a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.socials {
  display: flex;
  gap: 25px;
  margin-top: 29px;
  font-size: 14px;
  font-weight: 500;
}

.socials span {
  margin-left: 5px;
  color: var(--muted);
}

.hero-portrait {
  position: absolute;
  display: block;
  width: 168px;
  height: auto;
  right: 10px;
  top: 112px;
  border-radius: 8px;
}

.section {
  border-top: 1px solid var(--line);
  padding: 44px 0 55px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

h2 {
  font: 600 30px/1.15 var(--sans);
  letter-spacing: -0.03em;
  margin: 10px 0 0;
}

.text-link {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.listing-link {
  display: inline-block;
  margin-top: 20px;
}

.text-link span {
  margin-left: 6px;
}

.section-head>.text-link {
  margin-top: 24px;
}

.section-intro {
  color: var(--muted);
  font-size: 15px;
  margin: 16px 0 30px;
}

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 28px;
}

.project-visual {
  display: block;
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: 5px;
  isolation: isolate;
}

.project-visual:hover .mini-window,
.project-visual:hover .secret-art {
  transform: translateY(-5px) rotate(-2deg);
}

.visual-label {
  position: absolute;
  left: 17px;
  bottom: 13px;
  font-size: 10px;
  letter-spacing: 1.45px;
  color: #555f54;
}

.material {
  background: #e9e3d6;
}

.material-orb {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f6e3a6, #b5b995 70%);
  left: -20px;
  top: -55px;
}

.mini-window {
  position: absolute;
  left: 19%;
  top: 24px;
  width: 67%;
  height: 140px;
  box-shadow: 0 9px 25px #6563421c;
  border: 1px solid #fff9;
  background: #faf8efdd;
  border-radius: 7px;
  overflow: hidden;
  transform: rotate(-4deg);
  transition: transform 0.3s;
}

.window-bar {
  height: 22px;
  background: #eeeadf;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 9px;
}

.window-bar i {
  height: 4px;
  width: 4px;
  border-radius: 50%;
  background: #b7ba9e;
}

.window-body {
  display: flex;
  height: 100%;
}

.mini-side {
  width: 25%;
  padding: 15px 8px;
  background: #e5e7d7;
}

.mini-side b {
  display: block;
  height: 4px;
  background: #b4bd94;
  margin-bottom: 11px;
  border-radius: 4px;
}

.mini-main {
  padding: 13px 11px;
  width: 75%;
}

.mini-main>span {
  font-size: 9px;
  color: #4b5440;
  font-weight: 600;
}

.swatches {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.swatches i {
  width: 26px;
  height: 24px;
  background: #7d8b56;
  border-radius: 4px;
}

.swatches i:nth-child(2) {
  background: #b2bb94;
}

.swatches i:nth-child(3) {
  background: #e9dba5;
}

.swatches i:nth-child(4) {
  background: #d5b59b;
}

.mini-block {
  height: 21px;
  background: #e3e6d5;
  border-radius: 4px;
  margin-top: 9px;
}

.cloaky {
  background: #e4ebe2;
}

.secret-art {
  position: absolute;
  left: 23%;
  top: 24px;
  width: 54%;
  transform: rotate(3deg);
  transition: transform 0.3s;
}

.secret-art svg {
  width: 100%;
  border: 7px solid #f6f8f2;
  box-shadow: 0 3px 10px #36563717;
  border-radius: 6px;
}

.secret-message {
  position: absolute;
  right: -36px;
  bottom: -11px;
  white-space: nowrap;
  padding: 8px 12px;
  background: #f8faf2;
  color: #455942;
  box-shadow: 0 3px 12px #3656370c;
  font-size: 10px;
  border: 1px solid #d3decc;
  border-radius: 3px;
  transform: rotate(-6deg);
}

.secret-message>span {
  margin-right: 5px;
  color: #748866;
}

.raycasting {
  background: #28322b;
}

.raycasting .visual-label {
  color: #c3d3b9;
}

.automata {
  background: #eee9df;
}

.project-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.project h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.25px;
  margin: 0;
}

.project h3 a:hover {
  color: var(--accent);
}

.project-arrow {
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.project p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 330px;
  margin: 6px 0 12px;
}

.project-meta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--muted);
}

.project-meta span {
  padding: 0 5px;
}

.preview-note {
  font-size: 13px;
  color: var(--muted);
  margin: 25px 0 0;
}

.writing-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.writing-list li {
  border-top: 1px solid var(--line);
}

.writing-list li:first-child {
  border-top: 0;
}

.writing-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.writing-list a {
  display: grid;
  grid-template-columns: 120px 1fr 20px;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
}

.writing-list time {
  font-size: 13px;
  color: var(--muted);
}

.writing-list a>span {
  font-size: 17px;
  font-weight: 500;
}

.writing-list b {
  font-weight: 400;
  color: var(--muted);
  text-align: right;
}

.writing-list a:hover>span,
.writing-list a:hover b {
  color: var(--accent);
}

.writing-footnote {
  font-size: 13px;
  color: var(--muted);
  margin: 19px 0 0;
}

.talk-icon {
  width: 42px;
  color: #8e9886;
}

.talks-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.talk {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.talk:first-child {
  border-top: 0;
}

.talk:last-child {
  border-bottom: 1px solid var(--line);
}

.talk h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}

.talk h3 a:hover {
  color: var(--accent);
}

.talk p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.about-page {
  padding-top: 37px;
}

.about-page .about-section {
  border-top: 0;
  padding-top: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 25px;
}

.about-grid h1 {
  font-size: 42px;
  letter-spacing: -0.7px;
  line-height: 1.13;
  margin: 0;
}

.about-copy p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 17px;
}

.about-copy p:first-child {
  color: var(--ink);
  font-size: 18px;
}

.about-copy>.text-link {
  display: inline-block;
  margin-top: 6px;
}

.contact {
  padding: 46px 0 54px;
}

.contact>a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 600 40px var(--sans);
  letter-spacing: -0.03em;
  margin-top: 13px;
}

.contact>a span {
  font: normal 32px var(--sans);
  color: var(--accent);
}

.contact>a:hover {
  color: var(--accent);
}

.contact p {
  font-size: 15px;
  color: var(--muted);
  margin: 11px 0 0;
}

footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 26px 0 35px;
  font-size: 13px;
  color: var(--muted);
}

footer a:hover {
  color: var(--accent);
}

@media (min-width: 1100px) {
  .page {
    max-width: 932px;
    padding: 0 54px;
  }
}

@media (max-width: 700px) {
  .page {
    padding: 0 25px;
  }

  .header {
    height: 82px;
    gap: 12px;
  }

  .header nav {
    gap: 16px;
    font-size: 13px;
  }

  .wordmark {
    font-size: 23px;
  }

  .wordmark .header-duck {
    width: 18px;
    height: 21px;
  }

  #theme-toggle {
    padding: 5px;
  }

  .hero {
    padding: 65px 0 57px;
  }

  h1 {
    font-size: 56px;
  }

  .hero-portrait {
    position: static;
    width: 112px;
    margin-bottom: 26px;
  }

  .intro {
    font-size: 20px;
    max-width: 380px;
  }

  .hero-note {
    font-size: 15px;
  }

  .projects {
    gap: 30px 20px;
  }

  .project-visual {
    height: 178px;
  }

  .project h3 {
    font-size: 16px;
  }

  .project-meta {
    font-size: 10px;
  }

  .visual-label {
    font-size: 9px;
    left: 12px;
  }

  .secret-message {
    font-size: 9px;
    right: -25px;
  }

  .section-head>.text-link {
    font-size: 13px;
  }

  .about-grid {
    gap: 24px;
  }

  .about-grid h1 {
    font-size: 36px;
  }

  .writing-list a {
    grid-template-columns: 102px 1fr 15px;
    gap: 14px;
  }

  .writing-list a>span {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 0 22px;
  }

  .header {
    flex-wrap: wrap;
    gap: 9px;
    height: 100px;
    padding: 16px 0;
  }

  .wordmark {
    flex: 1;
  }

  #theme-toggle {
    order: 1;
  }

  .header nav {
    order: 2;
    width: 100%;
    justify-content: space-between;
    margin: 0;
    gap: 12px;
    font-size: 13px;
  }

  .hero {
    padding: 48px 0;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 1.25px;
  }

  h1 {
    font-size: 46px;
    margin: 22px 0;
  }

  .hero-portrait {
    width: 104px;
    margin-bottom: 24px;
  }

  .intro {
    font-size: 19px;
  }

  .desktop-break {
    display: none;
  }

  .hero-note {
    font-size: 15px;
    max-width: 290px;
  }

  .socials {
    font-size: 14px;
    gap: 25px;
  }

  .section {
    padding: 35px 0 40px;
  }

  h2 {
    font-size: 26px;
  }

  .section-head {
    gap: 12px;
  }

  .section-head>.text-link {
    font-size: 13px;
    margin-top: 21px;
  }

  .section-intro {
    font-size: 15px;
    margin: 16px 0 25px;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 31px;
  }

  .project-visual {
    height: 205px;
  }

  .project h3 {
    font-size: 16px;
  }

  .project p {
    font-size: 15px;
  }

  .project-meta {
    font-size: 10px;
  }

  .visual-label {
    font-size: 9px;
    left: 17px;
  }

  .mini-window {
    left: 20%;
    width: 65%;
    top: 25px;
    height: 143px;
  }

  .secret-art {
    width: 52%;
    left: 24%;
  }

  .secret-message {
    font-size: 9px;
    right: -25px;
  }

  .writing-list a {
    grid-template-columns: 1fr 20px;
    padding: 19px 0;
    gap: 3px 10px;
  }

  .writing-list time {
    grid-column: 1;
    font-size: 12px;
  }

  .writing-list a>span {
    grid-column: 1;
    grid-row: 2;
    font-size: 16px;
  }

  .writing-list b {
    grid-column: 2;
    grid-row: 1/3;
  }

  .talk {
    padding: 20px 0;
  }

  .talk h3 {
    font-size: 16px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 20px;
  }

  .about-grid h1 {
    font-size: 38px;
  }

  .about-copy p {
    font-size: 15px;
  }

  .contact {
    padding: 35px 0 40px;
  }

  .contact>a {
    font-size: 32px;
  }

  footer {
    flex-wrap: wrap;
    font-size: 12px;
    gap: 13px;
    padding: 23px 0 30px;
  }
}

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

  * {
    transition: none !important;
  }
}

.experience {
  margin-top: 38px;
}

.experience-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 18px;
}

.job {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.job-company a {
  font-size: 18px;
  font-weight: 550;
}

.job-company a:hover {
  color: var(--accent);
}

.job-company a>span {
  font-size: 14px;
  color: var(--muted);
  margin-left: 5px;
}

.job-status {
  display: block;
  font-size: 11px;
  letter-spacing: 1.1px;
  color: var(--muted);
  margin-top: 7px;
}

.job:first-of-type .job-status {
  color: var(--accent);
}

.job-detail h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 1px 0 7px;
}

.job-detail p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

@media (max-width: 480px) {
  .job {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .job-company {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .job-status {
    margin: 0;
  }
}

.header nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.experiments-intro {
  padding: 37px 0 32px;
}

.back-home {
  display: inline-block;
  margin-bottom: 50px;
  color: var(--muted);
}

.experiments-intro h1 {
  font-size: 54px;
  margin: 20px 0 20px;
}

.experiments-intro .hero-note {
  margin-bottom: 32px;
}

.collection-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

.experiments-page>.preview-note {
  margin-bottom: 48px;
}

.hash-flooding {
  background: #26382e;
}

.hash-preview {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 22px;
}

.hash-code {
  font:
    12px/1.6 ui-monospace,
    monospace;
  color: #c5d2b9;
  display: block;
  margin: 0 0 9px 13px;
}

.hash-preview svg {
  width: 100%;
  display: block;
  max-height: 115px;
}

.hash-flooding .visual-label {
  color: #c0cfb4;
}

@media (max-width: 700px) {
  .experiments-intro h1 {
    font-size: 50px;
  }

  .hash-code {
    font-size: 11px;
  }

  .hash-preview {
    top: 20px;
  }
}

@media (max-width: 480px) {
  .experiments-intro {
    padding: 28px 0;
  }

  .about-page {
    padding-top: 28px;
  }

  .back-home {
    margin-bottom: 35px;
  }

  .experiments-intro h1 {
    font-size: 38px;
  }

  .experiments-intro .intro {
    font-size: 19px;
  }

  .experiments-intro .hero-note {
    max-width: none;
    margin-bottom: 27px;
  }

  .experiments-page>.preview-note {
    margin-bottom: 35px;
  }

  .hash-preview {
    top: 25px;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121212;
    --ink: #eceee5;
    --muted: #a1aaa0;
    --line: #3b443c;
    --accent: #f1a48b;
    --soft: #2b322b;
  }
}