/* ============================================================
   base.css — Maurer Lab
   Variables, reset, typography, buttons, nav, footer, layout
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface2: #f5f2fa;
  --border: rgba(120, 90, 180, 0.12);
  --border-mid: rgba(120, 90, 180, 0.2);
  --accent-m: #c026d3;
  --accent-c: #0891b2;
  --text-primary: #18151f;
  --text-secondary: #4a4460;
  --text-muted: #8a82a0;
}

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── LAYOUT ── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem 6rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 3px;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #c026d3, #0891b2);
  color: #fff; border: none;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.28);
}
.btn-outline:hover { border-color: #e879f9; color: #e879f9; }

/* ── NAV ── */
header > nav, body > nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 4rem;
  background: #0a0612;
  border-bottom: 1px solid rgba(192,38,211,0.15);
  transition: padding 0.3s ease, border-color 0.3s ease;
}
header > nav.nav-scrolled, body > nav.nav-scrolled {
  padding: 0.35rem 4rem;
  border-bottom-color: rgba(192,38,211,0.25);
}
.nav-logo img {
  height: 82px; width: auto; display: block;
  transition: height 0.3s ease;
}
.nav-scrolled .nav-logo img { height: 52px; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover { color: #e879f9; }
.nav-links a.active { color: rgba(255,255,255,0.9); font-weight: 500; }

/* ── SECTION HEADERS ── */
.section-header {
  display: flex; align-items: center; gap: 1.2rem;
  margin: 4rem 0 2rem;
}
.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--accent-m);
}
.section-tag.cyan { color: var(--accent-c); }
.section-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-mid), transparent);
}

/* ── FOOTER ── */
.site-footer {
  position: relative;
  overflow: hidden;
  background: #04020e;
}
.footer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.footer-bg-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.75;
  display: block;
}
.footer-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(4,2,16,0.55) 0%, rgba(8,4,28,0.45) 100%);
}
.footer-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 3rem 3rem 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}
.footer-logo-img {
  height: 90px;
  width: auto;
  max-width: 320px;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.footer-umich-img {
  height: 32px; width: auto; max-width: 220px; display: block;
  opacity: 0.9; object-fit: contain; object-position: left center;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.footer-nav-label,
.footer-address-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-c);
  margin-bottom: 0.4rem;
  display: block;
}
.footer-nav a {
  font-size: 0.9rem; color: rgba(255,255,255,0.55);
  text-decoration: none; transition: color 0.18s;
}
.footer-nav a:hover { color: #e879f9; }
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.footer-address p {
  font-size: 0.85rem; color: rgba(255,255,255,0.45); line-height: 1.6;
}
.footer-address a {
  font-size: 0.85rem; color: var(--accent-c);
  text-decoration: none; margin-top: 0.3rem;
  transition: color 0.18s;
}
.footer-address a:hover { color: #e879f9; }
.footer-bottom {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 1rem 3rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem; color: rgba(255,255,255,0.22);
  font-family: 'Space Mono', monospace;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  header > nav, body > nav { padding: 1rem 1.5rem; }
  main { padding: 0 1.5rem 4rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.5rem 1.5rem 2rem; }
  .footer-brand { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 2rem; }
  .footer-bottom { padding: 1rem 1.5rem 1.5rem; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { flex-direction: column; align-items: flex-start; }
}

/* ── MOBILE NAV ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  z-index: 200;
}
.nav-hamburger span {
  display: block; height: 2px; width: 100%;
  background: rgba(255,255,255,0.85);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 768px) {
  header > nav, body > nav { padding: 0.6rem 1.5rem !important; }
  header > nav.nav-scrolled, body > nav.nav-scrolled { padding: 0.35rem 1.5rem !important; }
  .nav-logo img { height: 58px !important; }
  .nav-scrolled .nav-logo img { height: 42px !important; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(8,4,18,0.97);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 0; margin: 0;
  }
  .nav-links.mobile-open { opacity: 1; pointer-events: all; }
  .nav-links li { list-style: none; }
  .nav-links a { font-size: 1.2rem !important; letter-spacing: 0.14em; color: rgba(255,255,255,0.7) !important; }
  .nav-links a:hover, .nav-links a.active { color: #e879f9 !important; }
}
