/* MAD Speakers — theme pulled from the logo.
   - Bright blue accent (#1E88E5 family)
   - Charcoal dark backgrounds
   - Chrome silver highlights
*/

:root {
  --bg:         #15171a;
  --bg-2:       #1d2024;
  --surface:    #23272c;
  --surface-2:  #2a2d2f;
  --border:     #353a40;
  --text:       #e8eaed;
  --text-dim:   #a5acb4;
  --accent:     #1e88e5;
  --accent-2:   #4fc3f7;
  --chrome:     linear-gradient(180deg, #ffffff 0%, #cfe6ff 35%, #5aa3d8 55%, #ffffff 100%);
  --radius:     12px;
  --radius-sm:  6px;
  --shadow:     0 6px 24px rgba(0,0,0,.35);
  --container:  1200px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: .5px; }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }
h3 { font-size: 1.05rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: .08em; }

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 23, 26, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center;
  padding: 10px 16px;
}
.brand-logo {
  height: 44px; width: auto;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

main { max-width: var(--container); margin: 0 auto; padding: 24px 16px 48px; }

/* Home hero */
.hero { text-align: center; padding: 40px 16px 24px; }
.hero h1 {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.hero .tagline { color: var(--text-dim); margin: 0; }

/* About & contact sections on home page */
.about, .contact {
  margin-top: 48px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.about h2, .contact h2 {
  margin-top: 0;
  color: var(--accent);
}
.about p { line-height: 1.6; }
.contact a { color: var(--accent); }

/* Project grid */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 28px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.card-image { aspect-ratio: 4/3; background: var(--bg-2); overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-noimage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); font-size: .9rem;
}
.card-body { padding: 12px 14px 16px; }
.card-body h2 { font-size: 1.1rem; margin: 0 0 4px; }
.card-date { color: var(--text-dim); font-size: .9rem; margin: 0; }

/* Project page */
.project-header { padding: 8px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.project-header h1 {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.project-info {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 40px;
}
.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.info-block h3 { margin: 0 0 8px; }
.info-block p, .info-block pre {
  margin: 0; color: var(--text);
  white-space: pre-wrap; word-wrap: break-word;
}
.info-block pre {
  font: .85rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--bg-2);
  padding: 12px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
}

/* Galleries */
.gallery-section { margin: 32px 0; }
.gallery-section h2 {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
}
.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.media {
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.media a { display: block; width: 100%; height: 100%; }
.media img, .media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
}
.media a:hover img { transform: scale(1.04); }
.media-video { aspect-ratio: 16/9; }

.back { margin-top: 32px; }

/* Footer */
.site-footer {
  text-align: center;
  color: var(--text-dim);
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 50px rgba(0,0,0,.6);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(35,39,44,.85);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--accent); }

/* Mobile tweaks */
@media (max-width: 600px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grid    { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .brand-logo { height: 36px; }
  main { padding: 16px 12px 32px; }
}
