/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d1117;
  --bg-2:      #161b22;
  --bg-3:      #21262d;
  --border:    #30363d;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --accent:    #58a6ff;
  --accent-2:  #7c3aed;
  --green:     #3fb950;
  --red:       #f85149;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 8px 32px rgba(0,0,0,.4);
  --transition:.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,17,23,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}
.logo-dot { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-3);
  text-decoration: none;
}

.nav-link--lock {
  padding: 6px 8px;
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 480px;
}

/* ---- Sections ---- */
.section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type { border-bottom: none; }

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 32px;
}

.section-header .section-title { margin-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(88,166,255,.1);
  color: var(--accent);
  border: 1px solid rgba(88,166,255,.2);
}

/* ---- Grid & Cards ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(88,166,255,.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  border-color: rgba(88,166,255,.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; }

.card--link { cursor: pointer; text-decoration: none; color: inherit; }
.card--link:hover { text-decoration: none; }

.card--empty {
  border-style: dashed;
  opacity: .5;
}

.card-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.card-arrow {
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}
.card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

/* ---- Private locked state ---- */
.lock-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
}

.lock-prompt svg { opacity: .4; }
.lock-prompt p { font-size: 15px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #000;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:hover {
  opacity: .9;
  transform: translateY(-1px);
  text-decoration: none;
  color: #000;
}
.btn--full { width: 100%; }
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* ---- Login page ---- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(88,166,255,.08) 0%, transparent 60%), var(--bg);
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: block;
  margin-bottom: 32px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.field-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.field-input:focus { border-color: var(--accent); }
.field-input::placeholder { color: var(--text-muted); opacity: .5; }

.login-error {
  font-size: 13px;
  color: var(--red);
  background: rgba(248,81,73,.1);
  border: 1px solid rgba(248,81,73,.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.login-back {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.login-back:hover { color: var(--text); }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: auto;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero { padding: 48px 0 40px; }
  .section { padding: 40px 0; }
  .login-card { padding: 28px 24px; }
  .grid { grid-template-columns: 1fr; }
}
