/* =========================
   Global Styles
   ========================= */

:root {
  --bg: #eef4ff;
  --bg-strong: #dfeafe;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #1b2230;
  --muted: #5a6478;
  --accent: #3a78d6;
  --accent-2: #d45f9d;
  --border: rgba(27, 34, 48, 0.12);
  --shadow: 0 18px 60px rgba(23, 35, 68, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --max-width: 72rem;
  --focus: #0b5fff;
}

html[data-theme="dark"] {
  --bg: #0f1420;
  --bg-strong: #141c2d;
  --surface: rgba(20, 27, 41, 0.84);
  --surface-strong: #182132;
  --text: #eaf0ff;
  --muted: #b2bfd8;
  --accent: #8cb9ff;
  --accent-2: #ff9ecf;
  --border: rgba(234, 240, 255, 0.12);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  --focus: #8cb9ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(212, 95, 157, 0.16), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(58, 120, 214, 0.18), transparent 45%),
    linear-gradient(180deg, #f7faff, #eef4ff 55%, #f4eefb);
  line-height: 1.5;
  transition: background 220ms ease, color 220ms ease;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 158, 207, 0.14), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(140, 185, 255, 0.18), transparent 45%),
    linear-gradient(180deg, #0f1420, #121a28 55%, #151a29);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 18ch;
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #111;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}

.lede {
  color: var(--muted);
  max-width: 52ch;
  margin-top: 1rem;
  font-size: 1.06rem;
}

/* Generic links used inside cards (and hidden footer links, if re-enabled). */
.feed-link {
  margin-top: auto;
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}

.feed-link:hover {
  text-decoration: underline;
}

.feed-meta {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* =========================
   Section Styles
   ========================= */

.site-header {
  padding: 5rem 0 2rem;
}

.site-nav {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2rem), var(--max-width));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(20, 15, 8, 0.07);
  backdrop-filter: blur(10px);
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

html[data-theme="dark"] .site-nav {
  background: rgba(20, 27, 41, 0.78);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.08rem;
  flex: 0 0 auto;
}

html[data-theme="dark"] .brand-logo {
  background: rgba(255, 255, 255, 0.08);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop-group {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-list a {
  display: inline-block;
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.nav-list a:hover {
  background: rgba(58, 120, 214, 0.08);
  color: var(--text);
}

.nav-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.nav-theme-toggle:hover {
  background: #fff;
}

.nav-theme-toggle-icon {
  font-size: 0.95rem;
}

.nav-theme-toggle-label {
  font-size: 0.86rem;
  font-weight: 600;
}

html[data-theme="dark"] .nav-theme-toggle {
  background: rgba(24, 33, 50, 0.92);
}

html[data-theme="dark"] .nav-theme-toggle:hover {
  background: rgba(33, 44, 66, 0.96);
}

.mobile-nav-menu {
  display: none;
  margin-left: auto;
  position: relative;
}

.mobile-nav-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1;
}

.mobile-nav-summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-summary:hover {
  background: #fff;
}

.mobile-nav-summary-icon {
  font-size: 0.8rem;
  transition: transform 180ms ease;
}

.mobile-nav-menu[open] .mobile-nav-summary-icon {
  transform: rotate(180deg);
}

.mobile-nav-panel {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: min(18rem, calc(100vw - 2.5rem));
  padding: 0.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 42px rgba(20, 15, 8, 0.12);
  backdrop-filter: blur(10px);
}

.mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.mobile-nav-list a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
}

.mobile-nav-list a:hover {
  background: rgba(58, 120, 214, 0.08);
  color: var(--text);
}

.mobile-nav-theme-toggle {
  width: 100%;
  justify-content: center;
  margin-top: 0.55rem;
}

html[data-theme="dark"] .mobile-nav-summary {
  background: rgba(24, 33, 50, 0.92);
}

html[data-theme="dark"] .mobile-nav-summary:hover {
  background: rgba(33, 44, 66, 0.96);
}

html[data-theme="dark"] .mobile-nav-panel {
  background: rgba(20, 27, 41, 0.95);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.35);
}

.hero {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1rem;
}

.hero-copy,
.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.hero-copy {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.68));
  padding: clamp(1rem, 2vw, 2rem);
}

html[data-theme="dark"] .hero-copy {
  background: linear-gradient(160deg, rgba(24, 33, 50, 0.92), rgba(19, 26, 39, 0.8));
}

.hero-panel {
  background: linear-gradient(180deg, rgba(71, 129, 224, 0.93), rgba(212, 95, 157, 0.9));
  color: #f2fffe;
  padding: 1.25rem;
}

.hero-panel h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.hero-panel ul {
  margin: 0;
  padding-left: 1rem;
}

.hero-panel li + li {
  margin-top: 0.55rem;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section {
  padding: 1.25rem 0 0;
}

#about,
#activity {
  scroll-margin-top: 4.5rem;
}

.section-heading h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-note {
  margin: 0.6rem 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.activity-updated {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.about-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cards {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  text-align: center;
}

.site-footer p {
  color: var(--muted);
  margin: 0;
}

.footer-links {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.footer-links a:hover {
  color: var(--text);
  background: #fff;
}

html[data-theme="dark"] .footer-links a {
  background: rgba(24, 33, 50, 0.85);
}

html[data-theme="dark"] .footer-links a:hover {
  background: rgba(32, 44, 66, 0.95);
}

.footer-links .footer-link-email:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, white 65%);
  background: color-mix(in srgb, var(--accent) 10%, white 90%);
}

.footer-links .footer-link-portfolio:hover {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 35%, white 65%);
  background: color-mix(in srgb, var(--accent-2) 10%, white 90%);
}

.footer-links .footer-link-linkedin:hover {
  color: #0a66c2;
  border-color: color-mix(in srgb, #0a66c2 35%, white 65%);
  background: color-mix(in srgb, #0a66c2 10%, white 90%);
}

.footer-links .footer-link-github:hover {
  color: #24292f;
  border-color: color-mix(in srgb, #24292f 30%, white 70%);
  background: color-mix(in srgb, #24292f 8%, white 92%);
}

.footer-links a svg,
.footer-links a img {
  width: 1rem;
  height: 1rem;
  display: block;
  transition: filter 160ms ease;
}

.footer-links .footer-icon-portfolio {
  object-fit: contain;
  filter: grayscale(1) contrast(1.2) brightness(0.8);
}

.footer-links .footer-link-portfolio:hover .footer-icon-portfolio {
  filter: none;
}

.footer-links .footer-link-linkedin:hover img {
  filter: invert(34%) sepia(96%) saturate(1378%) hue-rotate(188deg) brightness(89%) contrast(94%);
}

.footer-links .footer-link-github:hover img {
  filter: none;
}

html[data-theme="dark"] .footer-links a img:not(.footer-icon-portfolio) {
  filter: invert(85%) sepia(8%) saturate(322%) hue-rotate(187deg) brightness(95%) contrast(90%);
}

html[data-theme="dark"] .footer-links .footer-icon-portfolio {
  filter: grayscale(1) contrast(1.1) brightness(1.2);
}

html[data-theme="dark"] .footer-links .footer-link-github:hover img {
  filter: invert(100%);
}

html[data-theme="dark"] .footer-links .footer-link-linkedin:hover {
  color: #fff;
  border-color: #0a66c2;
  background: #0a66c2;
}

html[data-theme="dark"] .footer-links .footer-link-linkedin:hover img {
  filter: invert(100%);
}

html[data-theme="dark"] .footer-links .footer-link-github:hover {
  color: #fff;
  border-color: #5d6674;
  background: #3a4250;
}

html[data-theme="dark"] .footer-links .footer-link-email:hover {
  color: #fff;
  border-color: #5f8fe8;
  background: #4f7fd8;
}

html[data-theme="dark"] .footer-links .footer-link-email:hover svg {
  color: #fff;
}

html[data-theme="dark"] .footer-links .footer-link-portfolio:hover {
  color: #fff;
  border-color: #e37db5;
  background: #cf5f9e;
}

/* =========================
   Component Styles
   ========================= */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.panel h3 {
  margin-top: 0;
}

.checklist {
  margin: 0;
  padding-left: 1.1rem;
}

.checklist li + li {
  margin-top: 0.5rem;
}

.about-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.link-list {
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.link-list a:hover {
  background: #fff;
}

html[data-theme="dark"] .link-list a {
  background: rgba(24, 33, 50, 0.85);
}

html[data-theme="dark"] .link-list a:hover {
  background: rgba(32, 44, 66, 0.95);
}

.link-list a svg,
.link-list a img {
  width: 1rem;
  height: 1rem;
  display: block;
  flex: 0 0 auto;
  transition: filter 160ms ease;
}

.link-list .footer-link-email:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, white 65%);
  background: color-mix(in srgb, var(--accent) 10%, white 90%);
}

.link-list .footer-link-portfolio:hover {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 35%, white 65%);
  background: color-mix(in srgb, var(--accent-2) 10%, white 90%);
}

.link-list .footer-link-linkedin:hover {
  color: #0a66c2;
  border-color: color-mix(in srgb, #0a66c2 35%, white 65%);
  background: color-mix(in srgb, #0a66c2 10%, white 90%);
}

.link-list .footer-link-github:hover {
  color: #24292f;
  border-color: color-mix(in srgb, #24292f 30%, white 70%);
  background: color-mix(in srgb, #24292f 8%, white 92%);
}

.link-list .footer-link-portfolio:hover .footer-icon-portfolio {
  filter: none;
}

.link-list .footer-link-linkedin:hover img {
  filter: invert(34%) sepia(96%) saturate(1378%) hue-rotate(188deg) brightness(89%) contrast(94%);
}

.link-list .footer-link-github:hover img {
  filter: none;
}

html[data-theme="dark"] .link-list a img:not(.footer-icon-portfolio) {
  filter: invert(85%) sepia(8%) saturate(322%) hue-rotate(187deg) brightness(95%) contrast(90%);
}

html[data-theme="dark"] .link-list .footer-icon-portfolio {
  filter: grayscale(1) contrast(1.1) brightness(1.2);
}

html[data-theme="dark"] .link-list .footer-link-github:hover img {
  filter: invert(100%);
}

html[data-theme="dark"] .link-list .footer-link-linkedin:hover {
  color: #fff;
  border-color: #0a66c2;
  background: #0a66c2;
}

html[data-theme="dark"] .link-list .footer-link-linkedin:hover img {
  filter: invert(100%);
}

html[data-theme="dark"] .link-list .footer-link-github:hover {
  color: #fff;
  border-color: #5d6674;
  background: #3a4250;
}

html[data-theme="dark"] .link-list .footer-link-email:hover {
  color: #fff;
  border-color: #5f8fe8;
  background: #4f7fd8;
}

html[data-theme="dark"] .link-list .footer-link-email:hover svg {
  color: #fff;
}

html[data-theme="dark"] .link-list .footer-link-portfolio:hover {
  color: #fff;
  border-color: #e37db5;
  background: #cf5f9e;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #fff;
}

html[data-theme="dark"] .btn-primary {
  background: linear-gradient(180deg, #8cb9ff, #6f9ef0);
  color: #0f1420;
}

html[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(180deg, #9bc3ff, #7aa7f5);
}

html[data-theme="dark"] .btn-secondary {
  background: rgba(24, 33, 50, 0.9);
  color: var(--text);
  border-color: rgba(234, 240, 255, 0.16);
}

html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(33, 44, 66, 0.98);
  border-color: rgba(234, 240, 255, 0.24);
}

/* Feed cards */
.feed-card {
  --service-accent: var(--accent);
  --service-tint: rgba(15, 118, 110, 0.08);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-top: 4px solid var(--service-accent);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  min-height: 14rem;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

html[data-theme="dark"] .feed-card {
  background: color-mix(in srgb, var(--surface-strong) 92%, #0f1420 8%);
}

.feed-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5.25rem;
  background: linear-gradient(180deg, var(--service-tint), transparent);
  pointer-events: none;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.feed-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.feed-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.service-icon {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.3rem;
  flex: 0 0 auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  padding: 0.08rem;
  transition: background-color 220ms ease, border-color 220ms ease;
}

html[data-theme="dark"] .service-icon {
  background: rgba(255, 255, 255, 0.08);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--service-accent) 25%, #ffffff 75%);
  background: color-mix(in srgb, var(--service-tint) 70%, #ffffff 30%);
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--service-accent) 72%, #1c1a16 28%);
  white-space: nowrap;
  transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

html[data-theme="dark"] .badge {
  border-color: color-mix(in srgb, var(--service-accent) 22%, rgba(255, 255, 255, 0.12) 78%);
  background: color-mix(in srgb, var(--service-accent) 12%, rgba(16, 22, 34, 0.92) 88%);
  color: color-mix(in srgb, var(--service-accent) 32%, #f4f7ff 68%);
}

.feed-updated {
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* Service-specific card accents */
.feed-card[data-feed="bluesky"] {
  --service-accent: #1185fe;
  --service-tint: rgba(17, 133, 254, 0.12);
}

.feed-card[data-feed="foursquare"] {
  --service-accent: #f06d1f;
  --service-tint: rgba(240, 109, 31, 0.12);
}

.feed-card[data-feed="albums1001"] {
  --service-accent: #0f766e;
  --service-tint: rgba(15, 118, 110, 0.11);
}

.feed-card[data-feed="spotify"] {
  --service-accent: #1db954;
  --service-tint: rgba(29, 185, 84, 0.11);
}

.feed-card .feed-link {
  color: var(--service-accent);
}

.feed-card .feed-line1 a,
.feed-card .spotify-line1 a {
  color: color-mix(in srgb, var(--service-accent) 78%, #1c1a16 22%);
}

html[data-theme="dark"] .feed-card .feed-line1 a,
html[data-theme="dark"] .feed-card .spotify-line1 a {
  color: color-mix(in srgb, var(--service-accent) 65%, #f4f7ff 35%);
}

.feed-content {
  color: var(--text);
}

.feed-content p {
  margin: 0;
}

/* Shared feed rows (Bluesky / Swarm / 1001) */
.feed-rows {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.6rem;
}

.feed-row {
  display: flex;
  align-items: start;
  gap: 0.65rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.feed-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.feed-row-body {
  flex: 1 1 auto;
  min-width: 0;
}

.feed-row-thumb {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: rgba(28, 26, 22, 0.04);
  display: block;
  align-self: center;
}

.feed-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.feed-row-top .feed-line1 {
  flex: 1 1 auto;
  min-width: 0;
}

.feed-line1 {
  margin: 0;
  color: var(--text);
}

.feed-line1 a {
  text-underline-offset: 2px;
}

.feed-line1 a:hover {
  text-decoration-thickness: 2px;
}

.feed-line2 {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 1001 rating badge rendered on the right side of rows */
.feed-row-badge {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0.02rem;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--badge-tone, var(--service-accent)) 35%, white 65%);
  background: color-mix(in srgb, var(--badge-tone, var(--service-accent)) 14%, white 86%);
  color: color-mix(in srgb, var(--badge-tone, var(--service-accent)) 82%, #1c1a16 18%);
  font-size: 0.76rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Center the 1001 rating badge vertically within the row. */
.feed-card[data-feed="albums1001"] .feed-row-badge {
  align-self: center;
  margin-top: 0;
}

html[data-theme="dark"] .feed-row-badge {
  border-color: color-mix(in srgb, var(--badge-tone, var(--service-accent)) 50%, white 50%);
  background: color-mix(in srgb, var(--badge-tone, var(--service-accent)) 22%, rgba(255, 255, 255, 0.08) 78%);
  color: color-mix(in srgb, var(--badge-tone, var(--service-accent)) 35%, #f4f7ff 65%);
}

/* Spotify card rows */
.spotify-list {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.65rem;
}

.spotify-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.spotify-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.spotify-row-body {
  min-width: 0;
}

.spotify-row-thumb {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: rgba(28, 26, 22, 0.04);
  display: block;
  align-self: center;
}

.spotify-line1 {
  margin: 0;
  color: var(--text);
}

.spotify-line1 a {
  text-underline-offset: 2px;
}

.spotify-line1 a:hover {
  text-decoration-thickness: 2px;
}

.spotify-line2 {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Skeleton loading state */
.feed-skeleton {
  margin-top: 0.2rem;
  display: grid;
  gap: 0.55rem;
}

.skeleton-row {
  display: grid;
  gap: 0.28rem;
}

.skeleton-bar {
  height: 0.78rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(28, 26, 22, 0.06),
    rgba(28, 26, 22, 0.12),
    rgba(28, 26, 22, 0.06)
  );
  background-size: 220% 100%;
  animation: skeletonPulse 1.25s ease-in-out infinite;
}

html[data-theme="dark"] .skeleton-bar {
  background: linear-gradient(
    90deg,
    rgba(234, 240, 255, 0.05),
    rgba(234, 240, 255, 0.12),
    rgba(234, 240, 255, 0.05)
  );
  background-size: 220% 100%;
}

.skeleton-bar.short {
  width: 42%;
}

.skeleton-bar.medium {
  width: 72%;
}

.skeleton-bar.long {
  width: 96%;
}

/* Motion helpers */
@keyframes skeletonPulse {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* =========================
   Mobile Styles
   ========================= */

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: 1fr;
  }

  .cards,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 42rem) {
  .site-nav {
    border-radius: 1rem;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.85rem;
  }

  .nav-desktop-group {
    display: none;
  }

  .mobile-nav-menu {
    display: block;
  }

  .feed-head {
    flex-direction: row;
    align-items: center;
    width: 100%;
  }

  .feed-head .feed-title {
    min-width: 0;
    flex: 1 1 auto;
  }

  .feed-head .badge {
    margin-left: auto;
    align-self: center;
    flex: 0 0 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
