:root {
  --bg: #faf5ee;
  --bg-alt: #f2ebe0;
  --card: #fffdfa;
  --border: #e2d8c7;
  --border-strong: #cfc3ac;
  --text: #1a1a1a;
  --muted: #56524a;
  --faint: #837c6e;
  --heading: #17140f;
  --heading-2: #3a352c;
  --heading-3: #5c564a;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --s: 0.5rem;
  --m: 0.75rem;
  --l: 1.25rem;
  --xl: 2.25rem;
  --xxl: 3.5rem;
  --page-bottom: 5rem;
  --page-width: 64rem;
  --page-pad: 2rem;
  --radius: 6px;
  --line: 1px solid var(--border);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover,
a:focus-visible {
  color: var(--heading);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
}
ul,
ol {
  padding-left: 1.2em;
}

h1,
h2,
h3 {
  margin: 0 0 var(--m);
  line-height: 1.15;
  font-weight: 700;
  text-align: left;
}
h1 {
  font-size: clamp(2rem, 1.55rem + 1.8vw, 3rem);
  color: var(--heading);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.45rem, 1.22rem + 0.9vw, 1.9rem);
  color: var(--heading-2);
  letter-spacing: -0.005em;
}
h3 {
  font-size: 1.08rem;
  color: var(--heading-3);
  font-weight: 600;
}
p {
  margin: 0 0 var(--l);
  max-width: 62ch;
}
p:last-child {
  margin-bottom: 0;
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
}
.container {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: var(--page-pad);
}
main {
  padding-bottom: var(--page-bottom);
}
.section {
  padding-top: var(--xxl);
}
.section:first-child {
  padding-top: var(--xl);
}
.section > h2:not(:first-child) {
  margin-top: var(--xl);
}
.content-gap {
  margin-top: var(--xl);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: var(--l);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--l);
}
.layout-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--xxl);
  align-items: start;
}
.layout-2col h2:not(:first-child) {
  margin-top: var(--xl);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: var(--line);
  background: var(--bg);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.7rem;
}
.nav__brand {
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav__toggle {
  display: none;
  padding: var(--s) var(--m);
  border: var(--line);
  border-radius: 3px;
  background: none;
  color: var(--text);
  font: 600 0.85rem var(--font);
  cursor: pointer;
}
.nav__list {
  display: flex;
  gap: var(--l);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav__list a {
  color: var(--muted);
  text-decoration: none;
}
.nav__list a:hover,
.nav__list a[aria-current="page"] {
  color: var(--heading);
}
.nav__list a[aria-current="page"] {
  padding-bottom: 2px;
  border-bottom: 2px solid var(--heading);
}

.btn {
  display: inline-block;
  padding: 0.5em 0.9em;
  border-radius: 3px;
  background: var(--bg-alt);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.btn:hover,
.btn:focus-visible {
  background: var(--border-strong);
}
.btn--primary {
  background: var(--heading);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--heading-2);
  color: var(--bg);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card {
  color: inherit;
  text-decoration: none;
}
.project-card:hover,
.project-card:focus-visible {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.project-card:focus-visible {
  outline: 2px solid var(--heading);
  outline-offset: 3px;
}
.card__thumb {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-alt);
}
.card__thumb--hero {
  aspect-ratio: 16/9;
  border: var(--line);
  border-radius: var(--radius);
}
.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem;
}
.card__title {
  margin: 0;
  color: var(--heading-2);
  font-size: 1.02rem;
}
.card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.tags,
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag,
.skills li {
  padding: 0.16em 0.5em;
  border-radius: 3px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  font-weight: 600;
}
.project-tags {
  margin-block: 1rem;
}

.info-box {
  padding: 1.1rem;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.info-box + .info-box {
  margin-top: var(--l);
}
.info-box h3 {
  margin-bottom: var(--s);
}
.info-box p,
.info-box ul {
  color: var(--muted);
  font-size: 0.85rem;
}
.info-box ul {
  margin: 0;
  padding-left: 1.1em;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--m);
  margin: var(--xl) 0 0;
  padding: 0;
  list-style: none;
}
.contact-list a {
  font-size: 1rem;
}

.player {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.player__cover {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 3px;
  background: var(--bg-alt);
}
.player__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player__main {
  flex: 1;
  min-width: 0;
}
.player__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--s);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.player__controls {
  display: flex;
  align-items: center;
  gap: var(--m);
}
.player__play {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  place-items: center;
  padding: 0;
  border: 1px solid var(--heading);
  border-radius: 50%;
  background: transparent;
  color: var(--heading);
  cursor: pointer;
}
.player__play:hover {
  background: var(--heading);
  color: var(--bg);
}
.player__icon {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}
.player__icon--play {
  transform: translateX(0.06rem);
}
.player__icon--pause {
  display: none;
}
.player__play.is-playing .player__icon--play {
  display: none;
}
.player__play.is-playing .player__icon--pause {
  display: block;
}
.player__bar {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
}
.player__bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 2px;
  background: var(--heading);
}
.player__time {
  min-width: 3.5em;
  color: var(--faint);
  font-size: 0.76rem;
  text-align: right;
}

.player__volume {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 6.5rem;
  flex: 0 0 auto;
}

.player__volume-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.player__volume input {
  width: 100%;
  height: 1rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

/* Chrome / Edge / Safari */
.player__volume input::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--border);
  border-radius: 999px;
}

.player__volume input::-webkit-slider-thumb {
  width: .7rem;
  height: .7rem;
  margin-top: calc((3px - .7rem) / 2);
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--text);
  border-radius: 50%;
  background: var(--surface);
}

/* Firefox */
.player__volume input::-moz-range-track {
  height: 3px;
  background: var(--border);
  border: 0;
  border-radius: 999px;
}

.player__volume input::-moz-range-thumb {
  width: .7rem;
  height: .7rem;
  border: 1px solid var(--text);
  border-radius: 50%;
  background: var(--surface);
}

.player__volume input:focus-visible {
  outline: none;
}

.player__volume input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.blog-header {
  margin-bottom: var(--xl);
}

.blog-meta {
  margin-top: var(--sm);
  color: var(--muted);
  font-size: .875rem;
}

.blog-content {
  max-width: 46rem;
}

.blog-content h2 {
  margin-top: var(--xl);
}

.blog-content pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-footer {
  padding-block: 1.5rem;
  border-top: var(--line);
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.4;
}
.site-footer .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--l);
}
.site-footer p {
  max-width: none;
  margin: 0;
}
.footer__social {
  display: flex;
  align-items: center;
  gap: var(--l);
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}
.footer__social a {
  color: inherit;
  font-weight: inherit;
}

@media (max-width: 640px) {
  :root {
    --xl: 1.75rem;
    --xxl: 2.5rem;
    --page-bottom: 3.5rem;
    --page-pad: 1.25rem;
  }

  .nav__toggle {
    display: inline-block;
    min-height: 2.75rem;
  }
  .nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: var(--m);
    padding: var(--l) var(--page-pad);
    border-bottom: var(--line);
    background: var(--bg);
  }
  .nav__list.is-open {
    display: flex;
  }
  .layout-2col {
    grid-template-columns: 1fr;
    gap: var(--xl);
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card__body,
  .info-box,
  .player {
    padding: 0.9rem;
  }
  .player {
    flex-wrap: wrap;
    gap: var(--m);
  }
  .player__meta {
    gap: var(--s);
  }
  .player__meta > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .site-footer .container {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .footer__social {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Blog */
.blog-list {
  display: grid;
  gap: 1rem;
}

.blog-meta {
  margin: 0 0 .5rem;
  color: var(--muted);
  font-size: .875rem;
}

.card__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}


/* Music browser */
.music-view-switch {
  display: inline-flex;
  gap: .25rem;
  margin-bottom: var(--xl);
  padding: .25rem;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.music-view-switch__button {
  padding: .55rem .8rem;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}

.music-view-switch__button:hover,
.music-view-switch__button.is-active {
  background: var(--heading);
  color: var(--bg);
}


.playlist-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--m);
  margin-bottom: var(--l);
}

.playlist-header h2 {
  margin: 0;
}

.playlist-header__meta {
  margin: .2rem 0 0;
  color: var(--faint);
  font-size: .8rem;
}

.playlist-back {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}

.playlist-back:hover {
  color: var(--heading);
}

@media (max-width: 700px) {

  .playlist-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
