/* Dan Barrett — Minimal v2
   A blog-shaped redesign. Single narrow column, type-driven, list-based.
   Two themes: "ink" (dark, current palette) and "paper" (cream, From-Jason mood).
   Both use the same Newsreader + Inter Tight + JetBrains Mono pairing.
*/

:root {
  /* Type */
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --serif: "Newsreader", "Freight Text Pro", Georgia, serif;
  --mono: "JetBrains Mono", "iA Writer Mono", "Courier New", monospace;

  /* Type scale — set on body, everything in em from here */
  --fs-body: 18px;

  /* Spacing — small base, generous vertical rhythm */
  --col-w: 620px;
  --col-pad: 32px;
  --gap-section: 64px;
  --gap-item: 14px;

  /* Default — ink theme. .theme-paper overrides. */
  --bg:       #0c0c0d;
  --bg-soft:  #131314;
  --fg:       #e8e3d8;          /* bone */
  --fg-dim:   #a8a39a;
  --fg-mute:  #6e6a62;
  --rule:     #26241f;
  --accent:   oklch(0.55 0.16 25);   /* oxblood, slightly warmer/saturated for dark */
  --link-underline: rgba(232, 227, 216, 0.32);
  --thumb-bg: #1a1a1a;
}

.theme-paper {
  --bg:       #f6f2e7;          /* warm cream */
  --bg-soft:  #efe9da;
  --fg:       #1a1814;
  --fg-dim:   #55514a;
  --fg-mute:  #8a857a;
  --rule:     #d8d1be;
  --accent:   oklch(0.42 0.16 25);   /* deeper oxblood for light bg */
  --link-underline: rgba(26, 24, 20, 0.28);
  --thumb-bg: #e6dfca;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}

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

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Layout shell ---------- */
.page {
  max-width: calc(var(--col-w) + var(--col-pad) * 2);
  margin: 0 auto;
  padding: 96px var(--col-pad) 120px;
}

@media (max-width: 640px) {
  .page { padding: 56px 22px 80px; }
  :root { --gap-section: 48px; --fs-body: 17px; }
}

/* ---------- Tiny top nav ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 64px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
}

.topbar__mark {
  font-family: var(--mono);
  font-weight: 400;
  color: var(--fg-dim);
  letter-spacing: 0;
  white-space: nowrap;
  font-size: 12px;
  transition: color 160ms ease;
}
.topbar__mark:hover { color: var(--fg); }

.topbar__nav {
  display: flex;
  gap: 22px;
  list-style: none;
}

.topbar__nav a {
  color: var(--fg-mute);
  transition: color 160ms ease;
}
.topbar__nav a:hover { color: var(--fg); }
.topbar__nav a.is-current {
  color: var(--fg);
}

@media (max-width: 540px) {
  .topbar { flex-direction: column; gap: 14px; align-items: flex-start; }
  .topbar__nav { flex-wrap: wrap; gap: 14px 18px; }
}

/* ---------- Header / identity ---------- */
.head {
  margin-bottom: var(--gap-section);
}

.head__portrait {
  width: 100%;
  margin: 0 0 32px;
  background: var(--thumb-bg);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.head__portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 62%;
}

.head__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.head__name .dot {
  color: var(--accent);
  margin-left: 0.05em;
}

.head__name-tail {
  font-style: italic;
  font-weight: 500;
  color: var(--fg-dim);
}

.head__sub {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--fg-mute);
}

.head__sub + .head__bio {
  margin-top: 28px;
}

.head__name + .head__bio {
  margin-top: 24px;
}

.head__bio {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--fg);
  text-wrap: pretty;
  max-width: 32em;
}

.head__bio p + p { margin-top: 0.9em; }

.head__bio em {
  font-style: italic;
  color: var(--fg);
}

/* ---------- Section ---------- */
.sect {
  margin-top: var(--gap-section);
}

.sect__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 22px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  flex-wrap: wrap;
}

.sect__head > span,
.sect__head > a {
  white-space: nowrap;
}

.sect__head .arrow {
  color: var(--fg-mute);
  opacity: 0.6;
}

.sect__head a.more {
  margin-left: auto;
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: color 160ms ease;
}
.sect__head a.more:hover { color: var(--fg); }

/* ---------- Lists (releases, shows, notes) ---------- */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

/* Release row — type-driven, optional thumbnail */
.release {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  transition: padding 200ms ease;
}

.release:first-child { border-top: 1px solid var(--rule); }

.release__thumb {
  grid-row: span 1;
  align-self: center;
  width: 44px;
  height: 44px;
  background: var(--thumb-bg);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
  padding: 4px;
}

.release__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release__thumb span {
  position: relative;
}

.release__thumb img + span {
  opacity: 0;
}

.release.no-thumbs { grid-template-columns: 1fr auto; }
.release.no-thumbs .release__thumb { display: none; }

.release__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.release__title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.release__meta {
  font-family: var(--display);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.01em;
}

.release__external {
  color: var(--fg-dim);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}

.release__external:hover {
  color: var(--fg);
}

.release__year {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  align-self: center;
}

/* Show row */
.show {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.show:first-child { border-top: 1px solid var(--rule); }

.show__date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.show__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.show__city {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
}

.show__venue {
  font-family: var(--display);
  font-size: 12px;
  color: var(--fg-mute);
}

.show__tag {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  align-self: center;
}

/* Note row — pure typography, no thumbs */
.note {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.note:first-child { border-top: 1px solid var(--rule); }

.note__date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}

.note__title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  text-wrap: pretty;
  letter-spacing: -0.005em;
}

.note__title a {
  background-image: linear-gradient(var(--link-underline), var(--link-underline));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 200ms ease;
  padding-bottom: 2px;
}
.note__title a:hover {
  background-size: 100% 1.5px;
  background-image: linear-gradient(currentColor, currentColor);
}

.note--archive {
  grid-template-columns: 86px minmax(0, 1fr) auto auto;
  gap: 14px;
}

.note__tag,
.note__time {
  font-family: var(--display);
  font-size: 11px;
  color: var(--fg-mute);
  white-space: nowrap;
}

.writing-years {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.writing-year__label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  margin-bottom: 10px;
}

@media (max-width: 560px) {
  .note--archive {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Project row — short label + one-line description */
.proj {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 10px 0;
}

.proj__name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.005em;
}

.proj__essence {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--fg-dim);
  line-height: 1.45;
  text-wrap: pretty;
}

@media (max-width: 540px) {
  .release { grid-template-columns: 36px 1fr auto; gap: 12px; }
  .release__thumb { width: 36px; height: 36px; font-size: 8px; }
  .show { grid-template-columns: 76px 1fr; }
  .show__tag { display: none; }
  .note { grid-template-columns: 76px 1fr; gap: 14px; }
  .proj { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Now block ---------- */
.now {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg);
  max-width: 32em;
  text-wrap: pretty;
}

.now .stamp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  margin-bottom: 8px;
  display: block;
  letter-spacing: 0.02em;
}

/* ---------- Inline links ---------- */
.ilink {
  background-image: linear-gradient(var(--link-underline), var(--link-underline));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 92%;
  transition: background-size 200ms ease, background-image 200ms ease;
}
.ilink:hover {
  background-image: linear-gradient(currentColor, currentColor);
}

.ilink--accent {
  color: var(--accent);
}

/* ---------- Page kicker (subpage header) ---------- */
.page-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 18px;
}

/* ---------- Project — long form (Work page) ---------- */
.proj-long-list {
  display: flex;
  flex-direction: column;
}

.proj-long {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
.proj-long:first-child { border-top: 1px solid var(--rule); }

.proj-long__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.proj-long__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.proj-long__name a:hover {
  color: var(--accent);
}

.proj-long__meta {
  display: flex;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

.proj-long__essence {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--fg-dim);
  margin-bottom: 10px;
  text-wrap: pretty;
}

.proj-long__blurb {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg);
  max-width: 36em;
  text-wrap: pretty;
}

/* ---------- Post (individual note / writing page) ---------- */
.post__head {
  margin-bottom: 56px;
}

.post__back {
  display: inline-block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-mute);
  margin-bottom: 36px;
  white-space: nowrap;
  transition: color 160ms ease;
}
.post__back:hover { color: var(--fg); }

.post__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  white-space: nowrap;
  overflow-x: auto;
}

.post__meta > span { display: inline; margin-right: 8px; }
.post__meta > span:last-child { margin-right: 0; }

.post__meta-sep { opacity: 0.5; }

.post__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--fg);
  text-wrap: balance;
  margin-bottom: 18px;
}

.post__dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  color: var(--fg-dim);
  text-wrap: pretty;
  max-width: 32em;
}

.post {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  color: var(--fg);
}

.post__source {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  margin-bottom: 28px;
}

.post p {
  margin-bottom: 1.1em;
  text-wrap: pretty;
}

.post em {
  font-style: italic;
}

.post__h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.006em;
  color: var(--fg);
  margin: 1.8em 0 0.6em;
}

.post__quote {
  margin: 1.6em 0 1.6em;
  padding-left: 22px;
  border-left: 2px solid var(--accent);
}
.post__quote p {
  font-style: italic;
  color: var(--fg-dim);
  margin-bottom: 0;
}

.post__list {
  margin: 0 0 1.3em 1.3em;
}

.post__list li {
  margin-bottom: 0.45em;
}

.post__sign {
  margin-top: 1.8em;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

/* Drop cap on first paragraph */
.post__dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-style: normal;
  float: left;
  font-size: 4.4em;
  line-height: 0.86;
  padding: 0.06em 0.08em 0 0;
  margin-right: 0.04em;
  color: var(--fg);
}

.no-dropcap .post__dropcap::first-letter {
  font-size: inherit;
  float: none;
  padding: 0;
  margin: 0;
  line-height: inherit;
}

/* Post footer (prev/next) */
.post__foot {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.post__foot-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 44px;
}

.post__foot-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--fg);
}

.post__foot-link--next {
  text-align: right;
  align-items: flex-end;
}

.post__foot-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.post__foot-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
  transition: color 160ms ease;
}

.post__foot-link:hover .post__foot-title {
  color: var(--accent);
}

.post__foot .foot {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 540px) {
  .post__title { font-size: 28px; }
  .post { font-size: 18px; }
  .post__foot-nav { grid-template-columns: 1fr; gap: 20px; }
  .post__foot-link--next { text-align: left; align-items: flex-start; }
}

/* ---------- Release page ---------- */
.rel__head {
  margin-bottom: 56px;
}

.rel__cover-wrap {
  margin: 8px 0 36px;
  max-width: 360px;
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--thumb-bg);
}

.rel__cover {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.rel__meta-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  white-space: nowrap;
  overflow-x: auto;
}
.rel__meta-line > span { margin-right: 8px; }
.rel__meta-line > span:last-child { margin-right: 0; }

.rel__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.08;
  letter-spacing: -0.014em;
  color: var(--fg);
  text-wrap: balance;
  margin-bottom: 18px;
}

.rel__dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.45;
  color: var(--fg-dim);
  text-wrap: pretty;
  max-width: 30em;
  margin-bottom: 28px;
}

.rel__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rel__btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 1px solid var(--rule);
  color: var(--fg);
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.rel__btn:hover {
  border-color: var(--fg-dim);
}

.rel__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.rel__btn--primary:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

/* Facts list */
.rel__facts {
  border-top: 1px solid var(--rule);
}

.rel__fact {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.rel__fact dt {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  align-self: center;
}

.rel__fact dd {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--fg);
  text-wrap: pretty;
}

/* Tracklist */
.rel__tracklist {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rel__side-label {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.rel__tracks {
  list-style: none;
}

.rel__track {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.rel__track-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}

.rel__track-title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--fg);
  text-wrap: pretty;
}

.rel__track-dur {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
  .rel__title { font-size: 32px; }
  .rel__fact { grid-template-columns: 100px 1fr; gap: 12px; }
  .rel__cover-wrap { max-width: 100%; }
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
}

.foot__links {
  display: flex;
  gap: 18px;
  list-style: none;
}

/* ---------- Ornament ---------- */
.ornament {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--rule);
  margin: 48px auto;
  position: relative;
}
.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 3px;
  background: var(--fg-mute);
  transform: translateY(-50%) rotate(45deg);
}
.ornament::before { left: -10px; }
.ornament::after  { right: -10px; }
