/* ========================================
   DoAI — Department of AI
   Dark theme + Gold accent
   ======================================== */

:root {
  --bg-primary: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1e1e1e;
  --gold: #D4AF37;
  --gold-dim: #b8962e;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --gold-glow-strong: rgba(212, 175, 55, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-dim: #666666;
  --border: #2a2a2a;
  --border-gold: rgba(212, 175, 55, 0.3);
  --radius: 8px;
  --radius-lg: 12px;
  --font-display: 'Oswald', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ───────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

.nav-logo img { height: 28px; width: 28px; }

.nav-links { display: flex; gap: 24px; }

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--gold); }

/* ── Container ─────────────────────── */

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

section { padding: 100px 0; }
section:first-of-type { padding-top: 140px; }

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 40px;
}

/* ── Hero ──────────────────────────── */

.hero {
  text-align: center;
  padding: 160px 0 100px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 20%, var(--gold-glow) 0%, transparent 60%);
  pointer-events: none;
}

.hero-logo {
  width: 140px;
  height: 154px;
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.2));
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-slogan {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-primary);
  margin: 24px 0 12px;
  font-weight: 500;
}

.hero-mission {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 420px;
  margin: 0 auto 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-gold {
  background: var(--gold);
  color: #0a0a0a;
}

.btn-gold:hover {
  background: var(--gold-dim);
  box-shadow: 0 0 20px var(--gold-glow-strong);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-outline:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

/* ── Modules ──────────────────────── */

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 60px;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all 0.2s;
}

.module-card:hover {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
}

.module-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.module-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.module-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Members Grid ─────────────────── */

.members-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.3s;
}

.member-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.member-card:hover::before { opacity: 1; }

.member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  overflow: hidden;
  margin: 0 auto 14px;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.member-role {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.member-module {
  display: inline-block;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Builder Section ──────────────── */

.builder-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.builder-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-transform: uppercase;
}

.builder-tab:hover { color: var(--text-secondary); }
.builder-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.builder-panel { display: none; }
.builder-panel.active { display: block; }

.builder-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.builder-controls {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.control-group { margin-bottom: 20px; }
.control-group:last-child { margin-bottom: 0; }

.control-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.control-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.control-input:focus { border-color: var(--gold-dim); }

.control-input::placeholder { color: var(--text-dim); }

select.control-input {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.file-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-height: 80px;
}

.file-upload:hover {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

.file-upload-icon {
  font-size: 24px;
  margin-bottom: 6px;
  color: var(--text-dim);
}

.file-upload-text {
  font-size: 12px;
  color: var(--text-dim);
}

.file-upload.has-file {
  border-color: var(--gold-dim);
  border-style: solid;
}

.file-upload.has-file .file-upload-text { color: var(--gold); }

input[type="file"] { display: none; }

.builder-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.builder-preview canvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #111;
}

.builder-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

/* ── Frame Options ────────────────── */

.frame-options {
  display: flex;
  gap: 8px;
}

.frame-option {
  flex: 1;
  padding: 10px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
}

.frame-option:hover { border-color: var(--text-dim); }

.frame-option.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

/* ── Poster Slots ─────────────────── */

.poster-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.poster-slot {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  gap: 4px;
  padding: 4px;
  overflow: hidden;
  position: relative;
}

.poster-slot:hover { border-color: var(--gold-dim); }

.poster-slot.has-photo {
  border-style: solid;
  border-color: var(--gold-dim);
}

.poster-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 1px);
}

.poster-slot-name {
  position: relative;
  z-index: 1;
  font-weight: 600;
}

/* ── Profile Overlay (Linktree) ──── */

.profile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-primary);
  overflow-y: auto;
}

.profile-overlay.active { display: block; }

.profile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  position: relative;
}

.profile-back {
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  transition: color 0.2s;
}

.profile-back:hover { color: var(--gold); }

.profile-card {
  width: 100%;
  max-width: 420px;
  margin-top: 60px;
  text-align: center;
  position: relative;
}

.profile-top-line {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto 32px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gold);
  overflow: hidden;
  margin: 0 auto 20px;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profile-role {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.profile-module-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.profile-clearance {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold-dim);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.12);
  padding: 5px 16px;
  border-radius: 4px;
  margin-bottom: 32px;
}

/* ── Accounts ──────────────────────── */

.profile-accounts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
}

.account-item:hover {
  background: rgba(212, 175, 55, 0.06);
}

.account-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.account-icon svg {
  width: 100%;
  height: 100%;
}

.account-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
}

.account-service {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.2;
}

.account-id {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-item:hover .account-id {
  color: var(--gold);
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.profile-link:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-link-icon { font-size: 20px; flex-shrink: 0; }

.profile-link-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.profile-link-arrow {
  color: var(--text-dim);
  font-size: 16px;
  transition: color 0.2s;
}

.profile-link:hover .profile-link-arrow { color: var(--gold); }

.profile-links-empty {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 40px;
  font-style: italic;
}

.profile-footer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.profile-footer-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.profile-footer-text {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* member-card as link */
a.member-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* ── Footer ───────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-text {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.footer-text span { color: var(--gold); }

/* ── Responsive ───────────────────── */

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

  .builder-layout {
    grid-template-columns: 1fr;
  }

  .modules-grid { grid-template-columns: repeat(2, 1fr); }

  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; }

  .poster-slots { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 480px) {
  .members-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
  .hero { padding: 120px 0 60px; }
  .hero-logo { width: 100px; height: 110px; }
  .nav-links a { font-size: 10px; letter-spacing: 0; }
  .poster-slots { grid-template-columns: repeat(2, 1fr); }
}
