/* ============================================
   ANGELINA EMPIRE COMMUNITY
   Theme: Cloudflare Developer Docs Inspired
   ============================================ */

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

:root {
  --bg: #18181b;
  --bg-surface: #141416;
  --bg-card: #1c1c1f;
  --bg-card-h: #1f1c19;
  --bg-warm: #2a2118;
  --bg-warm-d: #3d2010;
  --border: #2a2a2a;
  --border-h: #3a3530;
  --orange: #ff5e1f;
  --orange-h: #ff7038;
  --orange-dim: rgba(255, 94, 31, 0.08);
  --orange-glow: rgba(255, 94, 31, 0.2);
  --text: #f0f0f0;
  --text-2: #9a9a9a;
  --text-muted: #505050;
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.1);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.1);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.1);
  --yellow: #d4a017;
  --yellow-dim: rgba(212, 160, 23, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --nav-h: 60px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}
img {
  display: block;
}

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-h);
  border-radius: 3px;
}

/* ─── NAV ─────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.25s,
    background 0.25s,
    backdrop-filter 0.25s;
}
.nav.scrolled {
  background: rgba(13, 13, 13, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border-h);
}
.nav-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition:
    color 0.15s,
    background 0.15s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-card);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition:
    transform 0.25s,
    opacity 0.25s;
}
.nav-hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ─── MOBILE MENU ─────────────────────────── */
.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  z-index: 99;
  background: rgba(13, 13, 13, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  flex-direction: column;
  gap: 4px;
  display: none;
}
.mobile-menu.active {
  display: flex;
}
.mobile-link {
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition:
    background 0.15s,
    color 0.15s;
}
.mobile-link:hover {
  background: var(--bg-card);
  color: var(--text);
}

/* ─── BUTTONS ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    border-color 0.2s,
    color 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-h);
  border-color: var(--orange-h);
  box-shadow: 0 0 24px var(--orange-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-h);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-h);
}
.btn-lg {
  padding: 11px 24px;
  font-size: 14px;
  border-radius: 100px;
}

/* ─── HERO ────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 64px) 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.1;
  filter: saturate(0.4) blur(2px);
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 90% 60% at 50% 30%,
      rgba(255, 94, 31, 0.05) 0%,
      transparent 65%
    ),
    linear-gradient(
      to bottom,
      rgba(13, 13, 13, 0.2) 0%,
      rgba(13, 13, 13, 0.65) 55%,
      rgba(13, 13, 13, 1) 100%
    );
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  mask-image: radial-gradient(
    ellipse 75% 75% at 50% 35%,
    black 0%,
    transparent 100%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 75% 75% at 50% 35%,
    black 0%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  background: var(--orange-dim);
  border: 1px solid rgba(255, 94, 31, 0.18);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--orange);
  animation: blink-dot 2s ease-in-out infinite;
}
@keyframes blink-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 1.5px solid var(--border-h);
  box-shadow: 0 0 48px rgba(255, 94, 31, 0.12);
}

.hero-title {
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 14px;
}
.hero-title-accent {
  color: var(--orange);
}

.hero-desc {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.75;
}

.hero-notice {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  background: var(--yellow-dim);
  border: 1px solid rgba(212, 160, 23, 0.14);
  border-radius: var(--radius);
  padding: 9px 13px;
  font-size: 12px;
  color: var(--yellow);
  margin-bottom: 28px;
  text-align: left;
  max-width: 500px;
  line-height: 1.5;
}
.hero-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

/* ─── TERMINAL ────────────────────────────── */
.hero-terminal {
  background: #080808;
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: #0f0f0f;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red {
  background: #ff5f57;
}
.terminal-dot.yellow {
  background: #febc2e;
}
.terminal-dot.green {
  background: #28c840;
}
.terminal-title {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
}
.terminal-body {
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 13px;
}
.terminal-line {
  display: flex;
  align-items: center;
  gap: 0;
}
.t-prompt {
  color: var(--orange);
}
.t-cmd {
  color: var(--text);
}
.t-cursor {
  color: var(--text);
  animation: caret 1s step-end infinite;
  margin-left: 2px;
}
@keyframes caret {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.terminal-output {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(255, 94, 31, 0.04);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 94, 31, 0.08);
  font-size: 12px;
  line-height: 1.85;
  color: var(--text-2);
}
.t-brace {
  color: var(--text-2);
}
.t-key {
  color: #79b8ff;
}
.t-colon {
  color: var(--text-muted);
}
.t-str {
  color: #85e89d;
}
.t-bool {
  color: #f97316;
}
.t-num {
  color: var(--orange);
}

/* ─── SECTIONS ────────────────────────────── */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--bg-surface);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  line-height: 1.1;
}
.section-desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── RESOURCES ───────────────────────────── */
.resource-category {
  margin-bottom: 48px;
}
.resource-category:last-child {
  margin-bottom: 0;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.category-title svg {
  color: var(--orange);
  flex-shrink: 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.resource-card {
  display: block;
  background: var(--bg-card);
  border: none;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding: 16px 18px;
  transition:
    background 0.18s,
    border-left-color 0.18s;
  position: relative;
}
.resource-card:hover {
  background: var(--bg-warm);
  border-left-color: var(--orange);
}
.resource-card-dim {
  opacity: 0.5;
}
.resource-card-dim:hover {
  opacity: 0.75;
  background: var(--bg-card);
  border-left-color: var(--border);
}

.rc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.rc-owner {
  font-size: 9px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rc-arrow {
  color: var(--text-muted);
  transition:
    color 0.18s,
    transform 0.18s;
}
.resource-card:hover .rc-arrow {
  color: var(--orange);
  transform: translate(2px, -2px);
}

.rc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.rc-url {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rc-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  border: 1px solid var(--border);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag-free {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.15);
}
.tag-key {
  background: var(--blue-dim);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.15);
}
.tag-maintenance {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.15);
}

/* ─── PROJECTS ────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card {
  display: block;
  background: var(--bg-card);
  border: none;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding: 22px;
  transition:
    background 0.18s,
    border-left-color 0.18s;
}
.project-card:hover {
  background: var(--bg-warm);
  border-left-color: var(--orange);
}
.project-card-featured {
  background: linear-gradient(135deg, #231810 0%, #1c1c1f 60%);
  border-left-color: rgba(255, 94, 31, 0.4);
}
.project-card-featured:hover {
  background: var(--bg-warm-d);
  border-left-color: var(--orange);
}

.pc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.pc-icon {
  color: var(--text-muted);
}
.pc-lang {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.pc-lang-js {
  background: rgba(234, 179, 8, 0.1);
  color: #d4a017;
  border: 1px solid rgba(234, 179, 8, 0.18);
}
.pc-lang-go {
  background: var(--blue-dim);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.18);
}

.pc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.pc-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: 16px;
}
.pc-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.pc-author {
  font-size: 12px;
  color: var(--text-muted);
}
.pc-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-dim);
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid rgba(255, 94, 31, 0.15);
}
.pc-repo {
  display: block;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  transition: color 0.18s;
}
.project-card:hover .pc-repo {
  color: var(--orange);
}

/* ─── COMMUNITY ───────────────────────────── */
.community-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 64px;
  align-items: center;
}

.community-motto {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.motto-bar {
  width: 3px;
  align-self: stretch;
  background: var(--orange);
  border-radius: 2px;
  flex-shrink: 0;
  min-height: 24px;
}
.motto-text {
  font-size: 14px;
  color: var(--text-2);
  font-style: italic;
  line-height: 1.65;
}

.community-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.rule-label {
  font-size: 12px;
  color: var(--text-muted);
}
.rule-code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-h);
  padding: 4px 10px;
  border-radius: var(--radius);
  color: var(--orange);
}

.community-card {
  width: 100%;
}

.community-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 1px solid var(--border-h);
  margin-bottom: 14px;
}
.community-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  transition: background 0.18s;
}
.stat:last-child {
  border-right: none;
}
.stat:hover {
  background: var(--bg-warm);
}
.stat-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.15;
  margin-bottom: 3px;
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── FOOTER ──────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--border-h);
}
.footer-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.footer-domain {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.footer-link {
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-radius: 6px;
  transition:
    color 0.15s,
    background 0.15s;
}
.footer-link:hover {
  color: var(--text);
  background: var(--bg-card);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}
.footer-copy-muted {
  opacity: 0.6;
}

/* ─── RESPONSIVE ──────────────────────────── */
@media (max-width: 900px) {
  .community-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .community-right {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  .community-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .resource-grid {
    grid-template-columns: 1fr;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  .footer-bottom {
    flex-direction: column;
  }
  .community-motto {
    flex-direction: row;
  }
}
