:root {
  --bg: #0f1115;
  --bg-alt: #181b22;
  --text: #e8e8ec;
  --muted: #9a9aa5;
  --accent: #6ee7b7;
  --max-width: 800px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); }

/* ---------- Hub landing page ---------- */

body.hub {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hub-name {
  text-align: center;
  padding: 2rem 1rem;
  z-index: 2;
}

.hub-name h1 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.tiles {
  flex: 1;
  display: flex;
  flex-direction: row;
}

.tile {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: flex-grow 0.4s ease;
}

.tile:hover,
.tile.active {
  flex-grow: 1.6;
}

.tile-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.55);
}

.tile:hover .tile-bg,
.tile.active .tile-bg {
  transform: scale(1.06);
  filter: brightness(0.75);
}

.tile-dev .tile-bg {
  background: linear-gradient(135deg, #1b2a3a, #2e4d6b 50%, #4f8ab0);
}

.tile-music .tile-bg {
  background: linear-gradient(135deg, #2a1b3a, #5a2e6b 50%, #b04f8a);
}

.tile-photo .tile-bg {
  background: linear-gradient(135deg, #3a2a1b, #6b4d2e 50%, #b08a4f);
}

.tile-label {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem;
}

.tile-title {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.tile-sub {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  body.hub { height: auto; }
  .tiles { flex-direction: column; }
  .tile { min-height: 33vh; flex-grow: 1 !important; }
}

/* ---------- Sub-pages ---------- */

.page-header {
  padding: 3rem 1rem 3rem;
  text-align: center;
}

.dev-header { background: linear-gradient(135deg, #1b2a3a, #2e4d6b 50%, #4f8ab0); }
.music-header { background: linear-gradient(135deg, #2a1b3a, #5a2e6b 50%, #b04f8a); }
.photo-header { background: linear-gradient(135deg, #3a2a1b, #6b4d2e 50%, #b08a4f); background-blend-mode: multiply; }

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.85;
}

.back:hover { opacity: 1; }

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 2.5rem 0;
  border-bottom: 1px solid #2a2e38;
}

section:last-child { border-bottom: none; }

h2 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #0f1115;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.button:hover { opacity: 0.85; }

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  font-style: italic;
}

/* Music split layout */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

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

/* Photography gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: start;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border: 1px solid #2a2e38;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Bandcamp releases */
.release-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.release iframe {
  display: block;
  border-radius: 6px;
}

/* GitLab project cards */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

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

.project-card {
  display: block;
  background: var(--bg-alt);
  border: 1px solid #2a2e38;
  border-radius: 6px;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--accent);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-width: 480px;
  margin-top: 0.5rem;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg-alt);
  border: 1px solid #2a2e38;
  border-radius: 4px;
  padding: 0.6rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--accent);
}

.contact-form button {
  margin-top: 0.75rem;
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
