:root {
  --bg: #11100d;
  --ink: #efe9d8;
  --muted: #9d978a;
  --line: rgba(239, 233, 216, 0.22);
  --red: #d64225;
  --green: #6fa58d;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 20% 15%, rgba(214, 66, 37, 0.12), transparent 26rem),
    var(--bg);
  font-family: "Courier New", Courier, monospace;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--red);
}

.home,
.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 5rem;
}

.masthead {
  margin: 0 calc(50% - 50vw);
  padding: 1.1rem 0 1.8rem;
  text-align: center;
}

.identity-switch {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.identity-switch [aria-current="page"] {
  color: var(--green);
  text-decoration: none;
}

.starfinger-link {
  position: relative;
  display: inline-block;
  padding: 0 0.1em;
  color: #ff8a2a;
  background:
    linear-gradient(90deg, rgba(214, 66, 37, 0.32), rgba(255, 138, 42, 0.42), rgba(111, 165, 141, 0.2)) 0 95% / 100% 0.2em no-repeat;
  font-size: 1.08em;
  font-weight: 900;
  text-decoration: none;
  text-shadow:
    0 0 0.55em rgba(255, 138, 42, 0.95),
    0.07em 0.07em 0 rgba(214, 66, 37, 0.74),
    -0.04em 0.04em 0 rgba(239, 233, 216, 0.26);
}

.starfinger-link::before {
  position: absolute;
  inset: -0.05em -0.16em 0.02em;
  z-index: -1;
  border-bottom: 1px solid rgba(255, 138, 42, 0.76);
  background:
    radial-gradient(ellipse at 50% 80%, rgba(255, 138, 42, 0.5), transparent 70%),
    rgba(214, 66, 37, 0.12);
  content: "";
}

.starfinger-link:hover {
  color: #ffd27b;
  text-shadow:
    0 0 0.75em rgba(255, 138, 42, 1),
    0.07em 0.07em 0 var(--red);
}

.masthead h1,
.masthead.compact > a {
  display: block;
  width: fit-content;
  margin: 0 auto;
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: clamp(3.2rem, 16vw, 14rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-shadow: 0.035em 0.035em 0 var(--red);
}

.masthead p {
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.45rem);
}

.masthead.compact a {
  font-size: clamp(3.5rem, 13vw, 8rem);
}

.projects,
.overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 3rem auto 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.project {
  min-height: 0;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(17, 16, 13, 0.94);
}

.project.starfinger {
  background: rgba(23, 22, 18, 0.96);
}

.overview-body {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: start;
}

.overview-copy {
  min-width: 0;
}

.portrait {
  position: relative;
  width: min(100%, 13rem);
  margin: 0;
  padding: 0.5rem;
  border: 1px solid rgba(239, 233, 216, 0.34);
  background:
    repeating-linear-gradient(90deg, rgba(239, 233, 216, 0.1) 0 1px, transparent 1px 6px),
    rgba(17, 16, 13, 0.9);
  transform: rotate(-1.2deg);
}

.portrait::after {
  position: absolute;
  inset: 0.5rem;
  background:
    repeating-linear-gradient(0deg, rgba(17, 16, 13, 0.2) 0 1px, transparent 1px 5px),
    linear-gradient(rgba(111, 165, 141, 0.14), rgba(214, 66, 37, 0.08));
  content: "";
  mix-blend-mode: multiply;
  pointer-events: none;
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(17, 16, 13, 0.92);
  filter: saturate(0.72) contrast(1.12) sepia(0.22);
}

.kicker {
  margin: 0 0 2.4rem;
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
}

h1 {
  margin: 4rem 0 1.5rem;
  font-size: clamp(3.5rem, 12vw, 9rem);
  line-height: 0.86;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.86;
}

h2 span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
}

.project p {
  max-width: 62rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.nope {
  margin-top: 2rem;
  color: var(--red);
}

.listen-widget {
  --player-accent: var(--green);
  --player-hot: var(--red);
  position: relative;
  display: grid;
  gap: 0.35rem;
  width: min(34rem, 100%);
  margin: 3rem auto 0;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(239, 233, 216, 0.08), transparent 18%),
    repeating-linear-gradient(90deg, rgba(239, 233, 216, 0.035) 0 1px, transparent 1px 6px),
    #171612;
  box-shadow:
    inset 0 0 0 1px rgba(17, 16, 13, 0.9),
    0.35rem 0.35rem 0 rgba(0, 0, 0, 0.22);
}

.listen-widget[data-theme="starfinger"] {
  --player-accent: #fff238;
  --player-hot: #38d8ff;
  color: #160917;
  border-color: #fff238;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 5px),
    linear-gradient(135deg, #ff3f91 0%, #ff8a2a 45%, #fff238 100%);
  box-shadow:
    0 0 0.8rem rgba(255, 63, 145, 0.75),
    0 0 2.2rem rgba(56, 216, 255, 0.36),
    0.35rem 0.35rem 0 rgba(0, 0, 0, 0.35);
}

.listen-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: baseline;
  min-width: 0;
}

.listen-top span {
  color: var(--player-accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.listen-widget[data-theme="starfinger"] .listen-top span {
  color: #160917;
  text-shadow: 0 0 0.45rem #fff238;
}

.listen-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-widget[data-theme="starfinger"] .listen-top p,
.listen-widget[data-theme="starfinger"] .listen-now span,
.listen-widget[data-theme="starfinger"] .listen-status {
  color: rgba(22, 9, 23, 0.78);
}

.listen-modes,
.listen-controls,
.listen-volume {
  display: flex;
  gap: 0.25rem;
}

.listen-volume {
  align-items: center;
  min-height: 1.65rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listen-widget[data-theme="starfinger"] .listen-volume {
  color: rgba(22, 9, 23, 0.78);
}

.listen-volume input {
  width: 4.8rem;
  accent-color: var(--player-accent);
}

.listen-widget button {
  min-height: 1.65rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(17, 16, 13, 0.82);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.listen-widget button:hover,
.listen-widget button[aria-pressed="true"] {
  border-color: var(--player-accent);
  color: var(--player-accent);
}

.listen-widget[data-theme="starfinger"] button {
  border-color: rgba(22, 9, 23, 0.44);
  color: #160917;
  background: rgba(255, 255, 255, 0.28);
}

.listen-widget[data-theme="starfinger"] button:hover,
.listen-widget[data-theme="starfinger"] button[aria-pressed="true"] {
  color: #160917;
  background: #38d8ff;
  box-shadow: 0 0 0.65rem rgba(56, 216, 255, 0.95);
}

.listen-controls button {
  min-width: 3rem;
}

.listen-now {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: baseline;
  min-width: 0;
}

.listen-now p {
  margin: 0;
  color: var(--player-accent);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-widget[data-theme="starfinger"] .listen-now p {
  color: #160917;
  text-shadow:
    0 0 0.55rem #fff238,
    0.08rem 0.08rem 0 #ff3f91;
}

.listen-now span,
.listen-status {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.listen-widget progress {
  width: 100%;
  height: 0.45rem;
  border: 1px solid var(--line);
  background: transparent;
  overflow: hidden;
}

.listen-widget progress::-webkit-progress-bar {
  background: rgba(239, 233, 216, 0.08);
}

.listen-widget progress::-webkit-progress-value {
  background: var(--player-accent);
}

.listen-widget progress::-moz-progress-bar {
  background: var(--player-accent);
}

.listen-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
}

.listen-menu-button {
  margin-left: 0;
}

.listen-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.listen-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(34rem, 100%);
  border: 1px solid var(--line);
  background: #11100d;
  box-shadow: 0.45rem 0.45rem 0 rgba(0, 0, 0, 0.35);
}

.listen-widget[data-theme="starfinger"] .listen-menu {
  border-color: #fff238;
  background: #160917;
  box-shadow:
    0 0 1.4rem rgba(255, 63, 145, 0.7),
    0.45rem 0.45rem 0 rgba(0, 0, 0, 0.35);
}

.listen-list {
  display: grid;
  gap: 1px;
  max-height: 16rem;
  overflow: auto;
  background: var(--line);
}

.listen-track {
  min-width: 0;
  padding: 0.5rem 0.6rem;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-track[data-active="true"] {
  color: var(--player-hot);
  background: rgba(239, 233, 216, 0.08);
}

.catalog {
  margin-top: 4rem;
}

.album-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 0 0 4rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.album-card {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  min-height: 9rem;
  padding: 1rem;
  background: rgba(17, 16, 13, 0.94);
}

.album-card img {
  display: block;
  width: 7rem;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
}

.album-card h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.15rem, 2.5vw, 1.8rem);
  line-height: 1;
}

.album-card p {
  margin: 0;
  color: var(--muted);
}

.records {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.records li {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(12rem, 0.85fr);
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.records a {
  font-weight: 800;
}

.records span {
  color: var(--muted);
}

.small-links {
  display: flex;
  gap: 1rem;
  margin-top: 4rem;
  color: var(--muted);
}

.page .catalog {
  margin-top: 0;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-head {
  margin-top: 4rem;
}

.lede,
.tag,
.listen-list,
.listen-item {
  color: var(--muted);
}

.tool-layout {
  display: block;
  margin-top: clamp(2rem, 12vh, 7rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  color: var(--red);
}

.prompt-output {
  display: grid;
  width: 100%;
  min-height: 18rem;
  padding: clamp(1.2rem, 5vw, 3rem);
  border: 1px solid var(--line);
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 16, 13, 0.9), rgba(17, 16, 13, 0.9)),
    repeating-linear-gradient(0deg, rgba(239, 233, 216, 0.08) 0 1px, transparent 1px 10px);
  font: inherit;
  place-items: center;
  cursor: pointer;
}

.prompt-output:hover,
.prompt-output:focus-visible {
  border-color: var(--red);
  outline: none;
}

#textbox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  width: 100%;
  color: var(--ink);
  font-family: Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-size: 4.5rem;
  line-height: 0.86;
  text-align: center;
  white-space: nowrap;
}

#emotion-word {
  min-width: 0;
  text-align: right;
}

#texture-word {
  min-width: 0;
  text-align: left;
}

.prompt-plus {
  color: var(--red);
}

@media (max-width: 760px) {
  .projects,
  .overview,
  .album-grid,
  .records li {
    grid-template-columns: 1fr;
  }

  .project {
    min-height: 0;
  }

  .overview-body {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: min(13rem, 72vw);
  }

  .listen-top {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .listen-bottom {
    display: grid;
  }

  .listen-volume {
    display: none;
  }

  .listen-menu-button {
    margin-left: 0;
  }

  .listen-menu {
    width: 100%;
  }

  .album-card {
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .album-card img {
    width: 5rem;
  }

  #textbox {
    font-size: 1.8rem;
  }
}

@media (pointer: coarse) {
  .listen-volume {
    display: none;
  }
}

@media (hover: none) {
  .listen-volume {
    display: none;
  }
}
