:root {
  color-scheme: light;
  --paper: #f8f4ea;
  --paper-raised: #faf8f1;
  --ink: #57410f;
  --muted: #716e61;
  --faint: #969184;
  --line: #dfdbce;
  --gold: #57410f;
  --green: #526a4e;
  --mono: "Geist Mono", "DM Mono", "SFMono-Regular", Consolas, monospace;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body,
body * {
  text-transform: lowercase;
}

body.resume-open {
  overflow: hidden;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  z-index: 20;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(calc(100% - 64px), 672px);
  margin-inline: auto;
}

.glass-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.site-header {
  isolation: isolate;
  position: sticky;
  z-index: 10;
  top: 16px;
  display: flex;
  justify-content: center;
  width: min(calc(100vw - 48px), 652px);
  margin: 16px auto 28px;
  padding: 0;
  border: 1px solid rgba(35, 27, 18, .11);
  border-radius: 16px;
  background: transparent;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .24) 42%, rgba(253, 251, 246, .34) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 2px 6px rgba(255, 255, 255, .45), inset 1px 0 0 rgba(255, 255, 255, .45), inset -1px 0 0 rgba(255, 255, 255, .45), inset 0 -1px 1px rgba(255, 255, 255, .32), inset 0 -6px 12px rgba(35, 27, 18, .04), 0 2px 6px rgba(35, 27, 18, .05), 0 12px 40px rgba(35, 27, 18, .11);
  backdrop-filter: url(#glass-refraction) blur(2px) saturate(2.1) brightness(1.06);
  -webkit-backdrop-filter: url(#glass-refraction) blur(2px) saturate(2.1) brightness(1.06);
  transition: border-color .3s ease;
}

.site-header::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(rgba(255, 255, 255, .62), rgba(255, 255, 255, .14) 30%, transparent 58%), radial-gradient(120% 190% at 8% -30%, rgba(255, 255, 255, .55), transparent 55%);
  background-size: 100% 100%, 180% 180%;
  background-position: 0 0, 0 0;
  animation: header-glass-shimmer 12s ease-in-out infinite alternate;
  content: "";
  pointer-events: none;
}

.site-header::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .25) 26%, rgba(176, 138, 44, .18) 52%, rgba(255, 255, 255, .18) 74%, rgba(255, 255, 255, .7) 100%);
  background-size: 250% 100%;
  background-position: 0 50%;
  animation: header-rim-flow 14s ease-in-out infinite alternate;
  content: "";
  pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 1;
  transition: opacity .35s ease;
}

@keyframes header-glass-shimmer {
  to { background-position: 0 0, 100% 100%; }
}

@keyframes header-rim-flow {
  to { background-position: 100% 50%; }
}

@supports not (mask-composite: exclude) {
  .site-header::after {
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
  }
}

.site-nav {
  position: relative;
  z-index: 1;
  width: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list li {
  flex: 0 0 auto;
}

.nav-list a,
.nav-contact {
  position: relative;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  padding: 6px 10px;
  border: 0;
  background: none;
  border-radius: 6px;
  color: #777161;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: -.025em;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease;
}

.nav-key {
  color: inherit;
  opacity: .35;
  transition: opacity .2s ease;
}

.nav-list a:hover,
.nav-contact:hover,
.nav-list a[aria-current="page"] {
  color: var(--gold);
}

.nav-list a:hover {
  background: rgba(120, 110, 82, .07);
}

.nav-list a:hover .nav-key,
.nav-list a[aria-current="page"] .nav-key,
.nav-resume .nav-contact:hover .nav-key {
  opacity: .7;
}

.nav-label {
  font-weight: 400;
}

.nav-list a[aria-current="page"] .nav-label {
  font-weight: 500;
}

.nav-underline {
  position: absolute;
  right: 8px;
  bottom: 1px;
  left: 8px;
  height: 2px;
  background: var(--gold);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.nav-list a:hover .nav-underline,
.nav-list a[aria-current="page"] .nav-underline {
  transform: scaleX(1);
}

.nav-resume {
  margin-left: auto;
  padding-left: 6px;
}

.nav-resume .nav-contact {
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 244, 234, .6);
  color: #716e61;
}

.nav-resume .nav-contact:hover {
  border-color: rgba(168, 128, 31, .45);
  background: rgba(168, 128, 31, .05);
}

.page-shell > main {
  min-height: 50vh;
}

.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 19px;
  margin: 0 0 8px;
}

.profile-avatar {
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d5d4c8;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #e8e4d7, #c9c5b3 68%, #bbb69f);
  color: #635d4c;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: -.06em;
}

.profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-dragon {
  position: absolute;
  top: 50%;
  right: 0;
  width: 150px;
  height: 150px;
  object-fit: contain;
  pointer-events: none;
  transform: translateY(-50%);
}

.profile h1 {
  margin: 0 0 2px;
  color: #39352c;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: 1.15;
}

.profile-subtitle {
  margin: 0;
  color: #77715e;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .01em;
}

.bio {
  max-width: 800px;
  margin-bottom: 38px;
  color: #5e5a4d;
  font-size: 14px;
  line-height: 1.95;
}

.bio p {
  margin: 0 0 12px;
}

.bio p:last-child {
  margin-bottom: 0;
}

.inline-link,
.bio a,
.work-card a,
.page-intro a {
  color: var(--gold);
  text-decoration-color: rgba(141, 116, 66, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .16s ease;
}

.inline-link:hover,
.bio a:hover,
.work-card a:hover,
.page-intro a:hover {
  text-decoration-color: currentColor;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  color: #716b59;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}

.section-heading a {
  color: #6d6756;
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
}

.section-heading a:hover {
  color: var(--gold);
}

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

.project-row {
  padding: 14px 0 15px;
  border-bottom: 1px solid var(--line);
  transition: padding-left .18s ease;
}

.github-project-state {
  color: var(--muted);
  font: 10px var(--mono);
}

.project-row:hover {
  padding-left: 4px;
}

.project-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}

.project-row h2,
.project-row h3 {
  margin: 0;
  color: #514a39;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.project-row h2 a,
.project-row h3 a {
  text-decoration: none;
  transition: color .16s ease;
}

.project-row h2 a:hover,
.project-row h3 a:hover {
  color: var(--gold);
}

.project-meta {
  flex: 0 0 auto;
  color: #948d7a;
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.project-row p {
  max-width: 78ch;
  margin: 0;
  color: #716c5f;
  font-size: 13px;
  line-height: 1.75;
}

.project-note {
  margin: 14px 0 0;
  color: #8a8475;
  font-family: var(--mono);
  font-size: 10px;
}

.notes-section {
  margin-top: 40px;
}

.notes-list .project-row {
  padding-block: 11px 12px;
}

.notes-list .project-row-head {
  margin: 0;
}

.notes-list .project-row h2 {
  font-weight: 400;
}

.notes-intro {
  margin: 9px 0 0;
  color: #8a8475;
  font-family: var(--mono);
  font-size: 10px;
}

.page-intro {
  position: relative;
  min-height: 158px;
  padding: 8px 170px 26px 0;
  animation: profile-in .55s both;
}

.page-dragon {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
}

.page-intro h1 {
  margin: 0 0 6px;
  color: #756d59;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.35;
}

.page-intro > p {
  max-width: 78ch;
  margin: 0;
  color: #777264;
  font-size: 13px;
  line-height: 1.8;
}

.page-intro .page-meta {
  margin-top: 14px;
  color: #8c8573;
  font-family: var(--mono);
  font-size: 10px;
}

.page-projects {
  margin-top: 4px;
}

.github-project-link {
  display: block;
  text-decoration: none;
}

.github-project-link:hover h2 {
  color: var(--gold);
}

.github-project-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font: 10px var(--mono);
}

.page-projects .project-row {
  padding-block: 15px 16px;
}

.project-status {
  margin-left: 8px;
  color: #9c8b62;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: lowercase;
}

.work-card {
  margin-top: 8px;
  padding: 22px 24px;
  border: 1px solid #e8e5da;
  border-radius: 6px;
  background: rgba(250, 249, 244, .28);
}

.work-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.work-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.work-period {
  color: #948d7a;
  font-family: var(--mono);
  font-size: 10px;
}

.work-role {
  margin: 3px 0 11px;
  color: #716a56;
  font-family: var(--mono);
  font-size: 11px;
}

.work-card > p:last-of-type {
  margin-bottom: 12px;
  color: #716c5f;
  font-size: 13px;
  line-height: 1.8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-list span {
  padding: 2px 6px;
  border: 1px solid #e2dfd3;
  border-radius: 3px;
  color: #817a69;
  font-family: var(--mono);
  font-size: 9px;
}

.open-source-summary {
  margin-bottom: 25px;
  color: #827b69;
  font-size: 13px;
}

.open-source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 25px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease;
}

.open-source-link:hover {
  border-color: #b7ad94;
  background: rgba(250, 249, 244, .48);
}

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

.focus-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: #716c5f;
  font-size: 13px;
}

.work-card .focus-list li {
  border-bottom: 0;
}

.focus-list span {
  margin-right: 10px;
  color: #a18d60;
  font-family: var(--mono);
  font-size: 10px;
}

.activity-section {
  margin-top: 40px;
}

.now-playing {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  color: #777161;
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
}

.now-playing:hover {
  color: var(--gold);
}

.spotify-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #777161;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.spotify-icon path {
  fill: currentColor;
  stroke: none;
}

.visitor-count {
  margin: 8px 0 0;
  color: #777161;
  font-family: var(--mono);
  font-size: 12px;
}

.duel-art {
  display: flex;
  height: 130px;
  align-items: flex-end;
  justify-content: center;
  margin-top: 64px;
  user-select: none;
}

.duel-art img {
  width: 300px;
  max-width: 64%;
  height: 130px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.site-footer {
  margin: 0;
}

.site-footer > .footer-socials {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}

.footer-socials a,
.footer-clock {
  color: #777161;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: color .16s ease;
}

.footer-socials a:hover {
  color: var(--gold);
}

.footer-clock {
  flex: 0 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.footer-art {
  margin: 48px 0 -56px;
  pointer-events: none;
  user-select: none;
}

.footer-art img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.music-toggle {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(248, 244, 234, .82);
  color: #777161;
  box-shadow: 0 8px 24px rgba(35, 27, 18, .14);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.music-toggle:hover {
  border-color: rgba(168, 128, 31, .45);
  background: rgba(248, 244, 234, .96);
  color: var(--gold);
}

.music-visualizer {
  display: flex;
  width: 14px;
  height: 12px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.music-visualizer span {
  width: 2px;
  height: 40%;
  border-radius: 999px;
  background: currentColor;
}

.music-toggle[aria-pressed="true"] .music-visualizer span {
  animation: music-wave .7s ease-in-out infinite alternate;
}

.music-toggle[aria-pressed="true"] .music-visualizer span:nth-child(2) {
  animation-delay: .18s;
}

.music-toggle[aria-pressed="true"] .music-visualizer span:nth-child(3) {
  animation-delay: .36s;
}

@keyframes music-wave {
  from {
    height: 35%;
  }

  to {
    height: 100%;
  }
}

.resume-dialog {
  position: fixed;
  width: min(768px, calc(100vw - 48px));
  max-width: none;
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  border: 1px solid #e5e0d1;
  border-radius: 16px;
  background: #fdfcf8;
  color: var(--ink);
  box-shadow: 0 18px 60px rgba(49, 45, 33, .24);
}

.resume-dialog::backdrop {
  background: rgba(66, 52, 31, .48);
  backdrop-filter: blur(3px);
}

.resume-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 24px 15px;
  border-bottom: 1px solid var(--line);
}

.resume-header h2 {
  margin: 0 0 3px;
  color: #39352c;
  font-size: 15px;
  font-weight: 500;
}

.resume-header p {
  margin: 0;
  color: #777264;
  font-size: 12px;
  line-height: 1.6;
}

.dialog-close {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8e825d;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dialog-close:hover {
  background: rgba(168, 128, 31, .08);
}

.resume-options {
  margin: 16px 24px;
  overflow: hidden;
  border: 1px solid #ded9cc;
  border-radius: 10px;
}

.resume-option {
  display: grid;
  width: 100%;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 16px 14px;
  border: 0;
  border-bottom: 1px solid #e7e2d7;
  background: transparent;
  color: #514a39;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease;
}

.resume-option:last-child {
  border-bottom: 0;
}

.resume-option:hover,
.resume-option[aria-pressed="true"] {
  background: #f0eadc;
}

.resume-option-marker {
  color: var(--gold);
  font-size: 12px;
}

.resume-option-title,
.resume-option-meta {
  display: block;
}

.resume-option-title {
  font-size: 12px;
}

.resume-option-meta {
  margin-top: 3px;
  color: #777264;
  font-size: 10px;
  line-height: 1.5;
}

.resume-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
}

.resume-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(168, 128, 31, .4);
  border-radius: 7px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}

.resume-action:hover {
  border-color: rgba(168, 128, 31, .65);
  background: rgba(168, 128, 31, .06);
}

.resume-download {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid #ded9cc;
  border-radius: 7px;
  color: #777161;
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}

.resume-download:hover {
  border-color: #b7ad94;
  color: #514a39;
}

.resume-email {
  margin-left: auto;
  color: #61583e;
  font-family: var(--mono);
  font-size: 10px;
  text-decoration: none;
}

.resume-email:hover {
  color: var(--gold);
}

.scramble-char {
  display: inline-block;
}

@media (max-width: 650px) {
  .footer-art {
    margin-bottom: -16px;
  }

  .music-toggle {
    right: 14px;
    bottom: 14px;
  }

  .page-shell {
    width: min(calc(100% - 36px), 520px);
  }

  .site-header {
    top: 8px;
    margin-top: 12px;
    margin-bottom: 32px;
  }

  .nav-list {
    gap: 1px;
    padding: 7px 6px;
  }

  .nav-list a,
  .nav-contact {
    padding-inline: 8px;
    font-size: 12px;
  }

  .nav-key {
    display: none;
  }

  .nav-resume .nav-contact {
    padding-inline: 8px;
  }

  .profile {
    gap: 13px;
  }

  .profile-avatar {
    width: 62px;
    height: 62px;
    font-size: 17px;
  }

  .profile-dragon {
    width: 104px;
    height: 104px;
    flex-basis: 104px;
  }

  .page-intro {
    min-height: 116px;
    padding-right: 116px;
  }

  .profile h1 {
    font-size: 31px;
  }

  .profile-subtitle {
    font-size: 10px;
  }

  .resume-header {
    padding: 15px 16px 13px;
  }

  .resume-options {
    margin: 14px 16px;
  }

  .resume-footer {
    flex-wrap: wrap;
    padding-inline: 16px;
  }

  .bio {
    font-size: 13px;
  }

  .project-meta {
    max-width: 42%;
    font-size: 9px;
  }

  .project-row p {
    font-size: 12px;
  }

  .work-card {
    padding: 17px 15px;
  }

  .footer-bar {
    align-items: flex-start;
  }

  .footer-socials {
    gap: 7px 11px;
  }
}

@media (max-width: 410px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .profile h1 {
    font-size: 28px;
  }

  .profile-subtitle {
    font-size: 9px;
  }

  .profile-dragon {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .page-intro {
    min-height: 88px;
    padding-right: 84px;
  }

  .project-row-head {
    gap: 8px;
  }

  .project-meta {
    max-width: 40%;
  }

  .footer-bar {
    flex-wrap: wrap;
  }

  .footer-socials {
    order: 3;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .music-toggle[aria-pressed="true"] .music-visualizer span {
    animation: none;
    height: 70%;
  }

  .site-header::before,
  .site-header::after {
    animation: none;
  }
}

/* Customization studio */
.customize-intro { min-height: 118px; }
.customize-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.customize-panel { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--paper-raised) 74%, transparent); }
.control-section { padding: 12px 0 14px; border-bottom: 1px solid var(--line); }
.control-section:first-child { padding-top: 0; }
.control-section h2 { margin: 0 0 10px; font-family: var(--mono); font-size: 10px; text-transform: lowercase; letter-spacing: .08em; }
.control-section label { display: grid; gap: 5px; margin-top: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.control-section input[type="text"], .control-section textarea, .control-section select { width: 100%; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-raised); color: var(--ink); font: 12px var(--sans); outline: none; }
.control-section input[type="text"], .control-section select { height: 34px; padding: 0 8px; }
.control-section textarea { padding: 8px; resize: vertical; }
.control-section input:focus, .control-section textarea:focus, .control-section select:focus { border-color: var(--gold); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme-button { display: grid; justify-items: start; gap: 5px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); font-family: var(--mono); font-size: 9px; cursor: pointer; }
.theme-button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); }
.theme-swatch { display: block; width: 100%; height: 22px; border: 1px solid rgba(0,0,0,.1); border-radius: 4px; }
.theme-swatch.cream { background: #f8f4ea; }.theme-swatch.ink { background: #0f0e0c; }.theme-swatch.sage { background: #dfe7d7; }
.check-row { grid-template-columns: 16px 1fr !important; align-items: center; }
.check-row input { accent-color: var(--gold); }
.save-status { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-family: var(--mono); font-size: 9px; }
body.custom-density-compact .project-row { padding-block: 8px; } body.custom-density-compact .bio p { margin-block: 8px; }
body.custom-density-roomy .project-row { padding-block: 24px; } body.custom-density-roomy .bio p { margin-block: 18px; }
body.hide-custom-art .profile-dragon, body.hide-custom-art .duel-art, body.hide-custom-art .footer-art { display: none !important; }
@media (min-width: 760px) { .palette-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-warning { padding: 9px 11px; border-left: 2px solid #b27730; background: rgba(178, 119, 48, .08); color: var(--muted); font-family: var(--mono); font-size: 10px !important; }
.content-editor { display: grid; gap: 6px; }
.content-editor details { border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--paper-raised) 42%, transparent); }
.content-editor summary { padding: 9px 10px; color: var(--ink); font-family: var(--mono); font-size: 10px; cursor: pointer; }
.content-editor details[open] summary { border-bottom: 1px solid var(--line); }
.content-subgroups { display: grid; gap: 2px; padding: 2px 8px 8px 14px; }
.content-subgroups details { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; }
.content-subgroups summary { padding: 7px 9px; color: var(--muted); font-size: 9px; }
.content-subgroups details[open] summary { border-bottom: 1px solid var(--line); }
.add-project-button { min-height: 34px; margin-top: 10px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 5px; background: var(--gold); color: var(--paper-raised); font: 10px var(--mono); cursor: pointer; }
.add-project-status { min-height: 16px; margin: 7px 0 0; color: var(--muted); font: 9px var(--mono); }
.footer-links-help { margin: 0 0 10px; color: var(--muted); font: 10px var(--mono); }
.footer-links-editor { display: grid; gap: 8px; }
.footer-link-row { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(0, 1.5fr) auto; align-items: end; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: color-mix(in srgb, var(--paper-raised) 42%, transparent); }
.footer-link-row label { display: grid; gap: 5px; color: var(--muted); font: 9px var(--mono); }
.footer-link-row input { width: 100%; min-width: 0; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-raised); color: var(--ink); font: 11px var(--sans); }
.footer-link-row input[aria-invalid="true"] { border-color: #b27730; }
.remove-footer-link { min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font: 9px var(--mono); cursor: pointer; }
@media (max-width: 520px) { .footer-link-row { grid-template-columns: 1fr auto; } .footer-link-row label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; } }
.home-collection-manager { display: grid; gap: 12px; margin-bottom: 14px; }
.home-collection { padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--paper-raised) 40%, transparent); }
.home-collection h2 { margin-bottom: 8px; }
.managed-items { display: grid; gap: 5px; }
.managed-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px var(--sans); }
.managed-item span { min-width: 0; overflow-wrap: anywhere; }
.collection-add-form { margin-top: 8px; }
.collection-add-form label { margin-top: 7px; }
.content-field { display: grid; gap: 5px; padding: 8px 10px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.content-field input, .content-field textarea, .content-image-field > input[type="text"] { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper-raised); color: var(--ink); font: 11px var(--sans); }
.content-field textarea { resize: vertical; }
.content-image-field { display: grid; gap: 6px; padding: 8px 10px; }
.content-image-field .content-field { padding: 0; border: 0; }
.content-image-field input[type="file"] { max-width: 100%; color: var(--muted); font: 10px var(--mono); }
.content-image-preview { max-width: 100%; max-height: 90px; object-fit: contain; object-position: left; }
.editor-loading, .editor-error { padding: 8px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.palette-editor { display: grid; gap: 9px; margin-top: 9px; }
.palette-card { padding: 9px; border: 1px solid var(--line); border-radius: 7px; background: color-mix(in srgb, var(--paper-raised) 72%, transparent); }
.palette-card h3 { margin: 0 0 8px; color: var(--ink); font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: lowercase; }
.palette-card .theme-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 8px; }
.palette-card input[type="color"] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper-raised); cursor: pointer; }
.palette-card label { grid-template-columns: 1fr 54px; align-items: center; }
.palette-card label input[type="color"] { grid-column: 2; grid-row: 1; }
.theme-swatch.ink { background: #0f0e0c; }
.theme-button[data-preset="night"] { grid-column: 1 / -1; }
.preview-window { color: var(--ink); }
.profile h1,
.page-intro h1,
.section-heading h2,
.project-row h2,
.project-row h3,
.work-card h2,
.resume-header h2,
.resume-option,
  color: var(--ink);
}

.nav-list a,
.nav-contact,
.nav-resume .nav-contact,
.profile-subtitle,
.bio,
.section-heading a,
.project-row p,
.project-note,
.page-intro > p,
.work-period,
.work-role,
.work-card > p:last-of-type,
.tag-list span,
.open-source-summary,
.focus-list li,
.now-playing,
.spotify-icon,
.visitor-count,
.footer-socials a,
.footer-clock,
.resume-header p,
.resume-option-meta,
.resume-download,
.resume-email,
.customize-panel {
  color: var(--muted);
}

.project-meta,
.page-intro .page-meta,
.notes-intro,
.project-status,
.focus-list span,
.customize-panel,
.save-status {
  --text-faint: var(--faint);
}

.project-meta,
.page-intro .page-meta,
.notes-intro,
.project-status,
.focus-list span {
  color: var(--faint);
}

.profile-avatar {
  border-color: var(--line);
  background: radial-gradient(circle at 38% 30%, var(--paper-raised), var(--line) 68%, var(--muted));
  color: var(--ink);
}

.work-card,
.resume-dialog,
.resume-options,
.resume-option,
.tag-list span {
  border-color: var(--line);
}

.work-card,
.resume-dialog {
  background: var(--paper-raised);
}

.resume-option:hover,
.resume-option[aria-pressed="true"] {
  background: color-mix(in srgb, var(--gold) 12%, var(--paper-raised));
}

.nav-resume .nav-contact {
  background: color-mix(in srgb, var(--paper-raised) 70%, transparent);
}

.music-toggle {
  background: color-mix(in srgb, var(--paper-raised) 82%, transparent);
  color: var(--muted);
}

.music-toggle:hover {
  background: var(--paper-raised);
}

.footer-art img {
  mix-blend-mode: multiply;
}

html[data-theme-mode="dark"] .footer-art img {
  mix-blend-mode: screen;
  opacity: .82;
  filter: brightness(.9) saturate(.88);
}

html[data-theme-mode="dark"] .site-header {
  border-color: color-mix(in srgb, var(--ink) 24%, transparent);
  background: color-mix(in srgb, var(--paper-raised) 72%, transparent);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .1), inset 0 2px 6px rgba(255, 255, 255, .035), inset 0 -1px 1px rgba(0, 0, 0, .2), 0 2px 6px rgba(0, 0, 0, .1), 0 12px 40px rgba(0, 0, 0, .2);
}

html[data-theme-mode="dark"] .site-header::before {
  background: linear-gradient(rgba(255, 255, 255, .035), rgba(255, 255, 255, .008) 38%, transparent 65%), radial-gradient(120% 190% at 8% -30%, rgba(255, 255, 255, .03), transparent 55%);
}

html[data-theme-mode="dark"] .site-header::after {
  background: linear-gradient(145deg, rgba(255, 255, 255, .38), rgba(130, 130, 130, .16), rgba(255, 255, 255, .28));
}

html[data-theme-mode="dark"] .nav-list a:hover,
html[data-theme-mode="dark"] .nav-resume .nav-contact:hover {
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}

html[data-theme-mode="dark"] .profile-dragon {
  filter: brightness(.84) saturate(.82);
}

html[data-theme-mode="dark"] .duel-art img {
  filter: none;
  mix-blend-mode: normal;
}


html.page-scrolled .site-header::after {
  opacity: .68;
}
