:root {
  --color-bg: #0a0a0a;
  --color-text: #f0ece4;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --cols: 3;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.portfolio-hero {
  padding: 0.5rem 3vw 0;
  text-align: center;
}
.portfolio-brand {
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  display: block;
  transition: opacity 0.3s;
}
.portfolio-brand:hover { opacity: 0.6; }
.portfolio-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  color: rgba(255,255,255,0.35);
  margin-top: 0.6rem;
  text-transform: uppercase;
}
.portfolio-divider {
  width: 60px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0.8rem auto 0;
}

/* --- Grid --- */
.album-grid {
  padding: 1.5rem 0.75rem 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 0.75rem;
  margin: 0;
}
.album-cover {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/2;
  text-decoration: none;
  background: #fff;
  opacity: 0;
}
.album-cover.span-row {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  height: 50vw;
  max-height: min(50vw, 600px);
}
.album-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: transform 0.6s ease, filter 0.4s ease, opacity 0.8s ease;
}
.album-cover:hover img {
  transform: scale(1.03);
  filter: brightness(0.65);
}
.album-cover-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity 0.8s ease;
}
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 10vh 2rem;
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

/* --- Entrance animation states --- */
.album-cover.box-visible {
  opacity: 1;
  transition: opacity 0.4s ease;
}
.album-cover.photo-visible img {
  opacity: 1;
}
.album-cover.photo-visible .album-cover-title {
  opacity: 1;
}

/* --- Footer --- */
.portfolio-footer {
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  margin-top: auto;
}
.portfolio-footer .divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 0 auto 2.5rem;
}
.footer-email {
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  transition: opacity 0.3s;
}
.footer-email:hover { opacity: 0.6; }
.footer-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
}
.footer-nav a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  transition: color 0.3s;
}
.footer-nav a:hover { color: var(--color-text); }
.footer-copy {
  margin-top: 3rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.15);
}

@media (max-width: 1024px) {
  :root { --cols: 2; }
}
@media (max-width: 768px) {
  :root { --cols: 1; }
  .album-grid {
    padding: 1rem 0.5rem 0;
    gap: 0.5rem;
  }
  .portfolio-hero { padding: 0.5rem 1rem 0; }
  .portfolio-brand { letter-spacing: 0.15em; }
  .portfolio-subtitle { font-size: 0.7rem; letter-spacing: 0.3em; }
  .album-cover-title {
    font-size: 1rem;
    padding: 1rem;
  }
  .footer-nav { gap: 1.5rem; }
}
