/* Ashwin Konale portfolio
   Music-app layout (sidebar, shelves, tracklist, player bar) with a CRT console accent.
   Palette: plum-ink base, phosphor amber lead, cyan and magenta for cover art. */

:root {
  --ink: #15121d;        /* page */
  --deck: #1d1928;       /* sidebar, player */
  --well: #272235;       /* hover, inset */
  --line: #342d45;
  --text: #f3effa;
  --muted: #a39bb5;
  --amber: #ffb000;      /* phosphor lead */
  --cyan: #6ee7e0;
  --magenta: #ff5c8a;

  --display: "Chakra Petch", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --sidebar: 232px;
  --player: 72px;
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--player);
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 6px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: calc(100vh - var(--player));
  background: var(--deck);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 2px;
  font: 500 20px var(--mono); color: var(--amber);
  padding: 4px 12px;
  text-shadow: 0 0 8px rgb(255 176 0 / .45);
}
.cursor { width: 10px; height: 20px; background: var(--amber); margin-left: 4px; animation: blink 1.1s steps(1) infinite; box-shadow: 0 0 8px rgb(255 176 0 / .6); }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 12px; border-radius: 10px;
  font-weight: 500; color: var(--muted);
}
.nav a:hover { background: var(--well); color: var(--text); }
.nav a.is-active { background: var(--well); color: var(--text); }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.nav a.is-active svg { stroke: var(--amber); }

main { min-width: 0; padding-bottom: 40px; }

/* ---------- Covers (generated by main.js, or an <img>) ---------- */
.cover {
  position: relative; aspect-ratio: 1; width: 100%;
  border-radius: 8px; overflow: hidden; background: var(--well);
}
.cover > svg, .cover > img { width: 100%; height: 100%; object-fit: cover; }
/* CRT scanlines on every cover: the one console texture that ties it together */
.cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / .18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) var(--gutter) 48px; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 90% at 12% 10%, rgb(255 176 0 / .30), transparent 60%),
    radial-gradient(60% 80% at 70% 0%, rgb(255 92 138 / .22), transparent 60%),
    linear-gradient(to bottom, transparent 55%, var(--ink));
}
.hero-inner { position: relative; z-index: 1; display: flex; gap: clamp(24px, 4vw, 48px); align-items: flex-end; }
.cover--hero {
  width: clamp(180px, 24vw, 280px); flex: none; border-radius: 12px;
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .06);
}
.kicker { font: 500 15px var(--mono); color: var(--amber); margin-bottom: 10px; }
.kicker::before { content: "> "; opacity: .7; }
h1 {
  font-weight: 700; font-size: clamp(52px, 9vw, 112px); line-height: .9; letter-spacing: -.02em;
}
.lede { max-width: 58ch; margin-top: 20px; color: #d6d0e2; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font: 600 15px var(--body);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn--play { background: var(--amber); color: #1a1206; box-shadow: 0 0 24px -6px rgb(255 176 0 / .7); }
.btn--play:hover { background: #ffc233; }
.btn--ghost { border: 1px solid #4a4160; color: var(--text); }
.btn--ghost:hover { background: var(--well); }

/* ---------- Shelves ---------- */
.shelf { padding: 36px var(--gutter) 8px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h2 { font-weight: 700; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; }
.shelf-sub { color: var(--muted); margin-top: 6px; }
.shelf-arrows { display: flex; gap: 8px; }
.arrow {
  width: 38px; height: 38px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--text); cursor: pointer;
  display: grid; place-items: center;
}
.arrow:hover { background: var(--well); }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(170px, 19vw, 230px);
  gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 8px;
}
.row::-webkit-scrollbar { display: none; }
.tile { scroll-snap-align: start; }
.tile > a, .tile { display: block; }
.tile h3 { font-weight: 600; font-size: 17px; line-height: 1.25; margin-top: 12px; }
.tile p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tile > a .cover::before {
  /* play button on hover/focus, like a music app */
  content: ""; position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%231a1206'/%3E%3C/svg%3E") center/20px no-repeat;
  opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s;
}
.tile > a:hover .cover::before, .tile > a:focus-visible .cover::before { opacity: 1; transform: none; }
.tile--soon .cover { filter: saturate(.85); }

/* ---------- Tracklist ---------- */
.tracks { max-width: 880px; }
.track {
  display: grid; grid-template-columns: 28px 48px 1fr auto; align-items: center; gap: 16px;
  padding: 10px 12px; border-radius: 10px;
}
.track:hover { background: var(--deck); }
.track-n { font: 500 15px var(--mono); color: var(--muted); text-align: center; }
.cover--sm { width: 48px; border-radius: 6px; }
.track-main h3 { font-family: var(--body); font-weight: 600; font-size: 16px; }
.track-main p { color: var(--muted); font-size: 14px; }
.track-tag { font: 400 13px var(--mono); color: var(--muted); white-space: nowrap; }
.track-tag--now { color: var(--amber); }
.track.is-playing h3 { color: var(--amber); }

.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--amber); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 60%; animation-delay: -.3s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.6s; }
.eq i:nth-child(3) { height: 40%; }
@keyframes eq { 50% { transform: scaleY(.35); } }
.eq i { transform-origin: bottom; }

/* ---------- Contact ---------- */
.contact {
  margin: 48px var(--gutter) 0; padding: clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center;
  background: var(--deck); border: 1px solid var(--line); border-radius: 16px;
}
.cover--contact { border-radius: 10px; }
.contact p { color: #d6d0e2; margin: 10px 0 20px; max-width: 56ch; }

.colophon { padding: 32px var(--gutter) 0; color: var(--muted); font-size: 13px; }

/* ---------- Player bar ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--player);
  background: var(--deck); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
}
.player-progress { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--line); }
.player-progress span {
  display: block; height: 100%; width: 0; background: var(--amber);
  box-shadow: 0 0 10px rgb(255 176 0 / .8);
  animation: progress 90s linear infinite;
}
@keyframes progress { to { width: 100%; } }
.player-track { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cover--xs { width: 44px; border-radius: 6px; flex: none; }
.player-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { color: var(--muted); font-size: 13px; }
.player-links { display: flex; gap: 6px; }
.player-links a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.player-links a:hover { color: var(--text); background: var(--well); }
.player-links svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.player-links svg.fill { fill: currentColor; stroke: none; }

/* ---------- Small screens: sidebar becomes a top chip bar ---------- */
@media (max-width: 800px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .contact .btn { height: auto; padding: 12px 20px; overflow-wrap: anywhere; }
  .sidebar {
    position: sticky; top: 0; z-index: 10; height: auto;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 10px var(--gutter); border-right: 0; border-bottom: 1px solid var(--line);
    background: rgb(29 25 40 / .92); backdrop-filter: blur(10px);
  }
  .brand { font-size: 16px; padding: 4px 6px 4px 0; flex: none; }
  .cursor { height: 16px; width: 8px; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 6px 14px; border-radius: 999px; background: var(--well); font-size: 14px; white-space: nowrap; color: var(--text); }
  .nav a.is-active { background: var(--text); color: var(--ink); }
  .nav svg, .nav a:first-child { display: none; }
  html { scroll-padding-top: 64px; }

  .hero-inner { flex-direction: column; align-items: flex-start; }
  .cover--hero { width: 160px; }
  .shelf-arrows { display: none; }
  .row { grid-auto-columns: 62%; }
  .contact { grid-template-columns: 1fr; }
  .cover--contact { display: none; }
  .track { grid-template-columns: 20px 44px 1fr; }
  .track-tag { grid-column: 3; margin-top: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .eq i, .player-progress span { animation: none; }
  .player-progress span { width: 38%; }
}
