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

/* ─── FONTS ──────────────────────────────────────────── */
@import url("https://use.typekit.net/rgi2vmv.css");

/* ─── VARIABLES ──────────────────────────────────────── */
:root {
  --navy:   #0d1220;
  --navy2:  #111827;
  --line:   #1e3a5f;
  --dim:    #4a6080;
  --mid:    #8899aa;
  --text:   #ffffff;
  --green:  #00ff88;
  --yellow: #e8e060;
  --area:   'area', sans-serif;
  --bar-h:  44px;
}

/* ─── BASE ───────────────────────────────────────────── */
html, body {
  background: var(--navy);
  color: var(--text);
  font-family: var(--area);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── TOP BAR ────────────────────────────────────────── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--navy);
  z-index: 100;
}

#topbar-logo {
  font-family: var(--area);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text);
  text-transform: uppercase;
}

/* asterisk icon — hidden on desktop */
#topbar-icon {
  display: none;
  width: 28px;
  height: 28px;
}

#topbar-nav {
  display: flex;
  gap: 40px;
  list-style: none;
}

#topbar-nav a {
  font-family: var(--area);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text);
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.15s;
}
#topbar-nav a:hover,
#topbar-nav a.active { opacity: 1; }

/* mobile menu text */
#menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--text); font-family: var(--area);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.05em; cursor: pointer;
  padding: 0;
}

/* mobile nav overlay */
#mobile-nav {
  display: none;
  position: fixed;
  top: var(--bar-h); left: 0; right: 0; bottom: 0;
  background: var(--navy2);
  z-index: 200;
  flex-direction: column;
  padding: 32px 20px;
  gap: 4px;
}
#mobile-nav.open { display: flex; }
#mobile-nav a {
  font-family: var(--area);
  font-size: 22px;
  font-weight: 300;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
#mobile-nav a:first-child { border-top: 1px solid var(--line); }

/* ─── FILTER BAR ─────────────────────────────────────── */
#filterbar {
  position: fixed;
  top: calc(var(--bar-h) + 12px);
  left: 20px;
  z-index: 90;
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: none;
  border: 1px solid var(--text);
  color: var(--text);
  font-family: var(--area);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
}

/* ─── MAP — full viewport canvas ────────────────────── */
body.page-map { overflow: hidden; height: 100vh; }

#map-canvas {
  position: fixed;
  top: var(--bar-h); left: 0; right: 0;
  bottom: 0;
  display: block;
  cursor: crosshair;
}

/* ─── MAP SCROLL WRAPPER ─────────────────────────────── */
/* map content sits in a scrollable div below the fixed canvas */
.map-scroll {
  position: relative;
  z-index: 10;
  margin-top: 100vh; /* pushes join section below viewport */
}

/* ─── JOIN SECTION ───────────────────────────────────── */
.join-section {
  background: var(--navy);
  border-top: 1px solid var(--line);
  padding: 40px 20px 20px;
}

.join-section h2 {
  font-family: var(--area);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 300;
  color: var(--text);
  margin-bottom: 0;
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.15s;
}
.join-section h2:hover { opacity: 0.7; }

.join-section-line {
  border: none;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 32px 20px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.footer-logo {
  width: 52px;
  height: 52px;
  opacity: 0.9;
}

.footer-col-label {
  font-family: var(--area);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-col a,
.footer-col span {
  display: block;
  font-family: var(--area);
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 4px;
  transition: opacity 0.15s;
}
.footer-col a:hover { opacity: 0.6; }

/* ─── TOOLTIP ────────────────────────────────────────── */
#tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  background: var(--navy2);
  border: 1px solid var(--line);
  padding: 10px 14px;
  max-width: 220px;
  display: none;
}
.tt-name { font-size: 12px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.tt-role { font-size: 10px; color: var(--mid); margin-bottom: 6px; letter-spacing: 0.06em; }
.tt-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tt-tag  {
  border: 1px solid var(--green); padding: 1px 6px;
  font-size: 9px; color: var(--green);
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ─── SIDE PANEL ─────────────────────────────────────── */
#panel {
  position: fixed;
  top: var(--bar-h); right: 0; bottom: 0;
  width: 300px;
  border-left: 1px solid var(--line);
  background: var(--navy);
  z-index: 150;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  overflow-y: auto;
}
#panel.open { transform: translateX(0); }

#panel-header {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
#panel-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 4px; }
#panel-role { font-size: 10px; color: var(--mid); letter-spacing: 0.1em; text-transform: uppercase; }
#panel-close {
  background: none; border: none; color: var(--mid);
  cursor: pointer; font-family: var(--area);
  font-size: 10px; letter-spacing: 0.1em; padding: 0;
  transition: color 0.15s;
}
#panel-close:hover { color: var(--text); }
#panel-body { padding: 20px; }
.panel-section { margin-bottom: 24px; }
.panel-label {
  font-size: 9px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--dim); text-transform: uppercase;
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.panel-text { color: var(--mid); line-height: 1.8; font-size: 11px; }
.panel-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.panel-tag {
  border: 1px solid var(--green); padding: 2px 8px;
  font-size: 9px; color: var(--green);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.panel-connections { display: flex; flex-direction: column; }
.conn-item {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.conn-item:last-child { border-bottom: none; }
.conn-item:hover .conn-name { color: var(--text); }
.conn-dot  { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); flex-shrink: 0; }
.conn-name { color: var(--mid); font-size: 11px; transition: color 0.15s; flex: 1; }
.conn-type { font-size: 9px; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
#panel-visit {
  display: block; margin: 0 20px 20px;
  border: 1px solid var(--line); padding: 10px;
  text-align: center; color: var(--mid);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
}
#panel-visit:hover { border-color: var(--text); color: var(--text); }

/* ─── EMAIL POPUP ────────────────────────────────────── */
#popup-overlay {
  position: fixed; inset: 0;
  background: rgba(10,15,25,0.92);
  z-index: 500; display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
#popup-overlay.open { display: flex; }
#popup {
  background: var(--navy2);
  border: 1px solid var(--line);
  padding: 40px; width: 100%; max-width: 480px;
}
#popup h3 { font-size: 22px; font-weight: 300; color: var(--text); margin-bottom: 12px; }
#popup p  { font-size: 13px; color: var(--mid); line-height: 1.7; margin-bottom: 28px; }
#popup-email {
  width: 100%; background: var(--navy);
  border: 1px solid var(--line); color: var(--text);
  font-family: var(--area); font-size: 13px;
  padding: 12px 14px; margin-bottom: 10px; outline: none;
  transition: border-color 0.15s;
}
#popup-email:focus { border-color: var(--mid); }
#popup-email::placeholder { color: var(--dim); }
#popup-submit {
  width: 100%; background: var(--green); border: none;
  color: var(--navy); font-family: var(--area);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 13px; cursor: pointer; transition: opacity 0.15s; margin-bottom: 12px;
}
#popup-submit:hover { opacity: 0.85; }
#popup-close {
  background: none; border: none; color: var(--mid);
  font-family: var(--area); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; width: 100%; padding: 6px; transition: color 0.15s;
}
#popup-close:hover { color: var(--text); }

/* ─── RELEASES PAGE ──────────────────────────────────── */
body.page-releases { overflow: auto; height: auto; }

.releases-wrap { padding-top: var(--bar-h); }

.releases-filterbar {
  position: sticky; top: var(--bar-h); z-index: 90;
  padding: 12px 20px; background: var(--navy);
  border-bottom: 1px solid var(--line);
  display: flex; gap: 8px;
}

.releases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.release-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden; cursor: pointer;
  background: var(--navy2); display: block;
  border: 1px solid var(--line);
}

/* with image */
.release-card img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  position: absolute; inset: 0;
  transition: transform 0.4s ease;
}
.release-card:hover img { transform: scale(1.03); }
.release-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,18,32,0.85) 0%, transparent 55%);
}
.release-card-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
}

/* no image — text card */
.release-card-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 20px;
}
.release-card-meta {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.release-card-type {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--mid);
}
.release-card-date { font-size: 9px; color: var(--dim); letter-spacing: 0.1em; }
.release-card-title {
  font-size: 16px; font-weight: 300;
  color: var(--text); line-height: 1.25; margin-top: auto;
}
.release-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.release-card-tag {
  border: 1px solid var(--green); padding: 2px 8px;
  font-size: 9px; font-weight: 500;
  color: var(--green); letter-spacing: 0.1em; text-transform: uppercase;
}
.releases-empty {
  grid-column: 1/-1; padding: 80px 40px;
  text-align: center; font-size: 12px;
  color: var(--dim); letter-spacing: 0.1em;
}

/* ─── ABOUT PAGE ─────────────────────────────────────── */
body.page-about { overflow: auto; height: auto; }

.about-wrap {
  padding: calc(var(--bar-h) + 32px) 20px 0;
}

.about-section { margin-bottom: 64px; }

.about-label {
  font-family: var(--area);
  font-size: 11px; font-weight: 400;
  color: var(--mid); letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.about-text {
  font-family: var(--area);
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 300; line-height: 1.25;
  color: var(--text);
}
.about-text p + p { margin-top: 0.85em; }

/* who section smaller */
.about-section.who .about-text {
  font-size: clamp(16px, 2vw, 26px);
}

/* ─── CONTACT PAGE ───────────────────────────────────── */
body.page-contact { overflow: auto; height: auto; }

.contact-wrap {
  padding: calc(var(--bar-h) + 32px) 20px 0;
}

.contact-intro {
  font-family: var(--area);
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 300; line-height: 1.25;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

/* ─── PROFILE PAGE ───────────────────────────────────── */
body.page-scroll { overflow: auto; height: auto; }
.profile-wrap {
  max-width: 720px; margin: 0 auto;
  padding: calc(var(--bar-h) + 48px) 20px 80px;
}
.profile-back {
  display: inline-block; font-size: 10px;
  letter-spacing: 0.15em; color: var(--mid);
  text-transform: uppercase; margin-bottom: 40px;
  transition: color 0.15s;
}
.profile-back:hover { color: var(--text); }
.profile-header { margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile-name { font-size: 28px; font-weight: 300; color: var(--text); margin-bottom: 6px; }
.profile-role { font-size: 10px; letter-spacing: 0.18em; color: var(--mid); text-transform: uppercase; margin-bottom: 16px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.profile-tag { border: 1px solid var(--green); padding: 2px 10px; font-size: 9px; letter-spacing: 0.1em; color: var(--green); text-transform: uppercase; }
.profile-section { margin-bottom: 48px; }
.profile-section-label { font-size: 9px; font-weight: 600; letter-spacing: 0.22em; color: var(--dim); text-transform: uppercase; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.profile-bio { font-size: 14px; line-height: 1.9; color: var(--mid); font-weight: 300; }
.works-list { list-style: none; display: flex; flex-direction: column; }
.work-item { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 16px; }
.work-item:last-child { border-bottom: none; }
.work-title { font-size: 12px; color: var(--text); flex: 1; }
.work-title a { color: var(--text); transition: color 0.15s; }
.work-title a:hover { color: var(--green); }
.work-year { font-size: 10px; color: var(--dim); letter-spacing: 0.1em; flex-shrink: 0; }

/* ─── RESPONSIVE ─────────────────────────────────────── */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  #topbar-logo { display: none; }
  #topbar-icon { display: block; }

  #topbar-nav { gap: 24px; }
  #topbar-nav a { font-size: 11px; }

  .releases-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  #topbar-nav { display: none; }
  #menu-toggle { display: block; }

  #filterbar { display: none; }

  .releases-grid { grid-template-columns: 1fr; }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-text { font-size: 18px; }
  .contact-intro { font-size: 18px; }
}