/* ===========================
   StubeMusic Mini-Portal
   Design System & Styles
   =========================== */

/* --- Custom Properties --- */
:root {
  --bg-primary: #08080d;
  --bg-card: #111118;
  --bg-card-hover: #18182a;
  --text-primary: #eaeaf0;
  --text-secondary: #9090a8;
  --accent-orange: #f0a500;
  --accent-orange-dim: rgba(240, 165, 0, 0.15);
  --bmc-yellow: #FFDD00;
  --bmc-yellow-dim: rgba(255, 221, 0, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(240, 165, 0, 0.35);
  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 12px 40px rgba(240, 165, 0, 0.12), 0 4px 20px rgba(0, 0, 0, 0.5);
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

/* --- Layout --- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  padding: 48px 0 24px;
  text-align: center;
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-orange), transparent);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-name span {
  color: var(--accent-orange);
}

.brand-tagline {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.brand-bio {
  margin-top: 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.8;
}

/* --- Section Titles --- */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 32px;
  padding-left: 4px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: var(--accent-orange);
  border-radius: 3px;
  margin-right: 12px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* --- Projects Section --- */
.projects-section {
  padding: 56px 0 32px;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card-grid--single {
  grid-template-columns: 1fr;
  max-width: 520px;
}

/* --- Project Card --- */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth),
    border-color var(--transition-smooth);
  cursor: pointer;
}



.card-image {
  position: relative;
  overflow: hidden;
  background: #0d0d14;
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* OndaKit logo card has different aspect ratio */
.card-image--logo {
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px;
  background: linear-gradient(135deg, #0d0d14 0%, #12121f 100%);
}

.card-image--logo img {
  width: 80%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
}

.card-body {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-desc {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.card-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-orange-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition:
    opacity var(--transition-smooth),
    transform var(--transition-smooth);
}

.card-arrow svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-orange);
  stroke-width: 2.5;
  fill: none;
}

/* --- Buy Me a Coffee Section --- */
.bmc-section {
  padding: 48px 0 56px;
  text-align: center;
}

.bmc-message {
  max-width: 480px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  opacity: 0.85;
}

.bmc-banner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 36px;
  background: var(--bmc-yellow-dim);
  border: 1px solid rgba(255, 221, 0, 0.2);
  border-radius: var(--radius-btn);
  color: var(--bmc-yellow);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition:
    background var(--transition-smooth),
    border-color var(--transition-smooth),
    transform var(--transition-smooth),
    box-shadow var(--transition-smooth);
  cursor: pointer;
}

.bmc-banner:hover {
  background: rgba(255, 221, 0, 0.18);
  border-color: rgba(255, 221, 0, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 221, 0, 0.1);
}

.bmc-banner .bmc-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

/* --- Footer --- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.footer-text a {
  color: var(--accent-orange);
  transition: opacity 0.2s;
}

.footer-text a:hover {
  opacity: 0.75;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 36px 0 20px;
  }

  .projects-section {
    padding: 40px 0 24px;
  }

  .card-body {
    padding: 16px 18px;
  }

  .bmc-banner {
    padding: 16px 28px;
    font-size: 1rem;
  }

  .card-image--logo {
    padding: 24px 32px;
  }
}
