:root {
    color-scheme: light;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    --muted: color-mix(in srgb, var(--text) 72%, var(--background));
    --line: color-mix(in srgb, var(--text) 19%, var(--background));
}
:root[data-theme^="d"] { color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--background); color: var(--text); font-size: 16px; line-height: 1.65; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; }
::selection { color: var(--background); background: var(--text); }
.page { width: min(840px, calc(100% - 48px)); margin-inline: auto; }
.appearance { display: flex; justify-content: flex-end; align-items: center; gap: 22px; padding-top: 26px; min-height: 66px; }
.palette-picker { display: flex; flex-wrap: wrap; gap: 3px; }
.palette-swatch { width: 27px; height: 32px; border: 0; padding: 6px; background: none; border-radius: 50%; display: grid; place-items: center; }
.palette-swatch::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--swatch); }
.palette-swatch[aria-pressed="true"]::before { outline: 1px solid var(--text); outline-offset: 4px; }
.palette-swatch:hover::before { outline: 1px solid var(--text); outline-offset: 3px; }
.theme-toggle { background: none; border: 0; display: flex; align-items: center; gap: 7px; padding: 8px 0 8px 10px; font-size: 13px; white-space: nowrap; }
.bulb-fill { display: none; }
:root[data-theme^="d"] .bulb-fill { display: block; }
.intro { display: grid; grid-template-columns: 1fr 180px; column-gap: 65px; padding: 60px 0 48px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(43px, 7vw, 66px); font-weight: 700; letter-spacing: -3px; line-height: 1.1; }
.occupation { margin-top: 9px; color: var(--muted); font-size: 17px; }
.intro-copy { grid-column: 1; margin-top: 27px; max-width: 490px; }
.intro-copy p + p { margin-top: 12px; }
.code-icon { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: center; background: none; border: 0; padding: 14px; width: 154px; height: 154px; border-radius: 8px; }
.code-icon svg { width: 100%; height: 100%; overflow: visible; fill: var(--text); }
.code-back { fill: var(--secondary); }
.code-middle { fill: var(--primary); }
.code-icon:is(:hover, :focus-visible, .is-playing) { transform: scale(1.1) rotate(-5deg); }
.code-icon:is(:hover, :focus-visible, .is-playing) .code-middle { transform: translate(-1.5px, 1.5px); }
.code-icon:is(:hover, :focus-visible, .is-playing) .code-back { transform: translate(-4px, 3px); }
.socials { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 25px; margin-top: 24px; position: relative; font-size: 14px; }
.socials a, .discord { padding-block: 4px; }
.discord { background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; padding-inline: 0; }
.discord:hover { text-decoration-thickness: 2px; }
#copy-status { font-size: 12px; color: var(--muted); }
#copy-status:empty { display: none; }
h2 { font-size: 21px; letter-spacing: -.4px; font-weight: 700; line-height: 1.35; margin-bottom: 27px; }
.work { padding-top: 29px; border-top: 1px solid var(--line); }
.projects { display: grid; gap: 30px; }
.project { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 30px; align-items: center; }
.project-preview { display: block; border-radius: 4px; overflow: hidden; background: var(--secondary); }
.project-preview img { display: block; width: 100%; height: auto; }
.project h3 { font-size: 19px; font-weight: 700; line-height: 1.4; }
.project h3 a { text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }
.project-info p { margin-top: 5px; font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 410px; }
.project-type { display: inline-block; margin-top: 9px; font-size: 12px; color: var(--muted); }
.projects-status { margin-top: 22px; font-size: 14px; }
.about { margin-top: 47px; padding-top: 27px; border-top: 1px solid var(--line); }
.about h2 { margin-bottom: 16px; }
.about p { max-width: 660px; font-size: 15px; color: var(--muted); }
.about p + p { margin-top: 13px; }
footer { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 47px 0 30px; font-size: 12px; color: var(--muted); }
footer > span:first-child { font-weight: 700; }
.skip-link { position: fixed; top: 12px; left: 12px; padding: 10px 16px; color: var(--background); background: var(--text); transform: translateY(-180%); z-index: 10; }
.skip-link:focus { transform: translateY(0); }
@media (max-width: 600px) {
    .appearance { justify-content: space-between; gap: 10px; }
    .palette-picker { gap: 0; }
    .palette-swatch { width: 24px; }
    .theme-label { display: none; }
    .theme-toggle { width: 36px; justify-content: center; padding: 8px; }
    .intro { grid-template-columns: 1fr 86px; column-gap: 20px; padding-top: 42px; padding-bottom: 34px; }
    h1 { letter-spacing: -2px; }
    .occupation { font-size: 14px; }
    .code-icon { grid-row: 1; width: 86px; height: 86px; padding: 9px; }
    .intro-copy { grid-column: 1 / -1; font-size: 15px; margin-top: 25px; }
    .socials { gap: 12px 23px; margin-top: 18px; }
    #copy-status { flex-basis: 100%; }
    .project { grid-template-columns: 135px minmax(0, 1fr); gap: 20px; align-items: start; }
    .project-preview { margin-top: 3px; }
    .project-info p { font-size: 13px; }
    .project h3 { font-size: 17px; }
    .project-type { margin-top: 6px; }
    .about { margin-top: 36px; }
    footer { padding-top: 36px; }
    .palette-note { order: 3; width: 100%; }
}
@media (max-width: 390px) {
    .page { width: calc(100% - 36px); }
    .palette-swatch { width: 22px; }
    .project { grid-template-columns: 108px minmax(0, 1fr); gap: 16px; }
    h1 { font-size: 40px; }
    .intro { column-gap: 12px; grid-template-columns: 1fr 70px; }
    .code-icon { width: 70px; height: 70px; }
}
@media (prefers-reduced-motion: no-preference) {
    body { transition: background-color .2s, color .2s; }
    .code-icon, .code-icon use { transition: transform .5s cubic-bezier(.175, .885, .32, 1.275); }
}
@media (prefers-reduced-motion: reduce) {
    .code-icon:is(:hover, :focus-visible, .is-playing) { transform: none; }
}
