/* ═══════════════════════════════════════════════
   STAR SOCIETY — style.css
   Cybersecurity Community
═══════════════════════════════════════════════ */

:root {
  --bg: #050a0f;
  --surface: #080e15;
  --card: #0b1520;
  --border: #0f2030;
  --border2: #1a3a55;
  --cyan: #00d4ff;
  --cyan2: #00a8cc;
  --green: #00ff88;
  --red: #ff3355;
  --yellow: #ffd700;
  --text: #c8dde8;
  --muted: #4a7a9b;
  --dim: #1e3a50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  cursor: none;
}

/* ── CURSOR ─────────────────────────────────── */
.cursor {
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  position: fixed; z-index: 99999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s;
  box-shadow: 0 0 10px var(--cyan);
}
.cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(0,212,255,.4);
  border-radius: 50%;
  position: fixed; z-index: 99998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: all .12s ease;
}

/* ── SCAN LINES ─────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(0,0,0,.06) 2px, rgba(0,0,0,.06) 4px
  );
}

/* ── MATRIX CANVAS ──────────────────────────── */
#matrix {
  position: fixed; top: 0; left: 0; z-index: 0;
  opacity: .06; pointer-events: none;
}

/* ── NAV ────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(5,10,15,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem 3rem;
}
.nav-logo {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  border: 1px solid var(--cyan);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace;
  font-size: .8rem; color: var(--cyan);
  animation: logo-pulse 3s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%,100% { box-shadow: 0 0 8px rgba(0,212,255,.3); }
  50%      { box-shadow: 0 0 20px rgba(0,212,255,.6), inset 0 0 10px rgba(0,212,255,.1); }
}
.logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 1rem; font-weight: 700;
  color: #fff; letter-spacing: .15em;
}
.logo-text span { color: var(--cyan); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  transition: color .2s; position: relative; cursor: none;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--cyan); transition: width .3s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: .6rem; color: var(--green);
  background: rgba(0,255,136,.08);
  border: 1px solid rgba(0,255,136,.2);
  padding: .25rem .7rem;
  animation: blink-tag 2s step-end infinite;
}
@keyframes blink-tag { 0%,100% { opacity:1; } 50% { opacity:.5; } }

.btn-join {
  padding: .5rem 1.4rem;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: 'Rajdhani', sans-serif;
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  cursor: none; text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.btn-join:hover {
  background: rgba(0,212,255,.1);
  box-shadow: 0 0 20px rgba(0,212,255,.2);
}

/* ── HERO ───────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6rem 3rem 3rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(0,212,255,.04), transparent),
    radial-gradient(ellipse 40% 60% at 80% 30%, rgba(0,255,136,.02), transparent),
    linear-gradient(135deg, #050a0f, #060d14, #050a0f);
}
.hero-grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(0,212,255,.05);
  border: 1px solid rgba(0,212,255,.2);
  padding: .35rem 1rem; margin-bottom: 1.8rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem; color: var(--cyan); letter-spacing: .1em;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  animation: dot-blink 1.5s ease-in-out infinite;
}
@keyframes dot-blink { 0%,100% { opacity:1; } 50% { opacity:.2; } }

h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.05;
  color: #fff; margin-bottom: 1.2rem; letter-spacing: .03em;
}
h1 .accent { color: var(--cyan); }
h1 .line2 {
  display: block;
  font-size: clamp(.9rem, 2vw, 1.5rem);
  font-weight: 400; color: var(--muted); letter-spacing: .22em; margin-top: .4rem;
}
.hero-desc {
  font-size: .95rem; line-height: 1.8; color: var(--muted);
  max-width: 460px; margin-bottom: 2.5rem;
  border-left: 2px solid var(--border2); padding-left: 1rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
  padding: .8rem 2.2rem;
  background: linear-gradient(135deg, rgba(0,168,204,.8), rgba(0,212,255,.9));
  color: #020a0f; border: none; cursor: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  transition: filter .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 0 20px rgba(0,212,255,.25);
  display: inline-block;
}
.btn-primary:hover {
  filter: brightness(1.1); transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(0,212,255,.4);
}
.btn-outline {
  padding: .8rem 2.2rem;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text); cursor: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  transition: border-color .2s, color .2s;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

/* Terminal */
.terminal-window {
  background: var(--card);
  border: 1px solid var(--border2);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,212,255,.1);
}
.terminal-bar {
  background: var(--surface);
  padding: .6rem 1rem;
  display: flex; align-items: center; gap: .5rem;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.red    { background: #ff3355; }
.t-dot.yellow { background: #ffd700; }
.t-dot.green  { background: #00ff88; }
.t-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: .6rem; color: var(--muted);
  margin-left: auto; letter-spacing: .1em;
}
.terminal-body {
  padding: 1.5rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: .72rem; line-height: 1.9;
}
.t-line { display: flex; gap: .5rem; }
.t-prompt { color: var(--green); }
.t-cmd    { color: var(--cyan); }
.t-output { color: var(--muted); padding-left: 1rem; }
.t-output.success { color: var(--green); }
.t-output.warn    { color: var(--yellow); }
.t-output.error   { color: var(--red); }
.t-cursor {
  display: inline-block; width: 8px; height: 14px;
  background: var(--cyan);
  animation: blink-cursor .8s step-end infinite;
  vertical-align: middle;
}
@keyframes blink-cursor { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-stats {
  display: flex; gap: 0; margin-top: 1.5rem;
  border: 1px solid var(--border);
}
.h-stat {
  flex: 1; padding: 1rem; text-align: center;
  border-right: 1px solid var(--border);
}
.h-stat:last-child { border-right: none; }
.h-stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem; color: var(--cyan); font-weight: 700;
}
.h-stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: .55rem; color: var(--muted); letter-spacing: .1em;
  text-transform: uppercase; margin-top: .2rem;
}

/* ── TICKER ─────────────────────────────────── */
.ticker-wrap {
  overflow: hidden;
  background: var(--surface);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  padding: .6rem 0;
}
.ticker {
  display: flex; gap: 3rem;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.ticker span {
  font-family: 'Share Tech Mono', monospace;
  font-size: .68rem; color: var(--cyan);
  letter-spacing: .12em; flex-shrink: 0;
}
.ticker span::before { content: '//'; color: var(--muted); margin-right: .5rem; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTIONS COMMON ────────────────────────── */
section { position: relative; z-index: 1; padding: 7rem 3rem; }
.dark-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 3.5rem; }
.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: .65rem; color: var(--cyan);
  letter-spacing: .3em; margin-bottom: .8rem;
  display: flex; align-items: center; gap: .8rem;
}
.section-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700; color: #fff; line-height: 1.1;
  margin-bottom: .8rem;
}
.section-title .accent { color: var(--cyan); }
.section-sub { font-size: .88rem; color: var(--muted); max-width: 500px; }

/* ── COURSES ────────────────────────────────── */
.courses-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.course-card {
  background: var(--bg); padding: 2rem;
  position: relative; overflow: hidden;
  transition: background .3s;
}
.course-card:hover { background: var(--card); }
.course-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0; transition: opacity .3s;
}
.course-card:hover::before { opacity: 1; }
.course-badge {
  display: inline-block; padding: .2rem .7rem; margin-bottom: 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: .55rem; font-weight: 700; letter-spacing: .18em;
}
.course-badge.beginner  { background: rgba(0,255,136,.1); color: var(--green); border: 1px solid rgba(0,255,136,.2); }
.course-badge.intermediate { background: rgba(255,215,0,.1); color: var(--yellow); border: 1px solid rgba(255,215,0,.2); }
.course-badge.advanced  { background: rgba(255,51,85,.1); color: var(--red); border: 1px solid rgba(255,51,85,.2); }
.course-icon { font-size: 2rem; margin-bottom: 1rem; }
.course-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.05rem; font-weight: 600; color: #fff;
  margin-bottom: .6rem; letter-spacing: .05em;
}
.course-card p { font-size: .78rem; color: var(--muted); line-height: 1.75; margin-bottom: 1.2rem; }
.course-meta {
  display: flex; gap: .8rem; flex-wrap: wrap; align-items: center;
  font-family: 'Share Tech Mono', monospace; font-size: .58rem; color: var(--dim + 30%);
}
.course-meta span { color: var(--muted); }
.free-tag { color: var(--green) !important; border: 1px solid rgba(0,255,136,.3); padding: .1rem .5rem; }
.pro-tag  { color: var(--cyan) !important;  border: 1px solid rgba(0,212,255,.3); padding: .1rem .5rem; }

/* ── TOOLS ──────────────────────────────────── */
.tools-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.tool-card {
  background: var(--surface); padding: 1.8rem;
  transition: background .25s;
  cursor: none;
}
.tool-card:hover { background: var(--card); }
.tool-name {
  font-family: 'Orbitron', monospace;
  font-size: .9rem; font-weight: 700; color: var(--cyan);
  margin-bottom: .5rem;
}
.tool-desc { font-size: .75rem; color: var(--muted); line-height: 1.65; margin-bottom: .8rem; }
.tool-tag {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: .55rem; color: var(--muted);
  border: 1px solid var(--border2); padding: .15rem .6rem;
}

/* ── BLOG ───────────────────────────────────── */
.blog-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.blog-card {
  background: var(--bg); padding: 2.2rem;
  transition: background .3s;
}
.blog-card:hover { background: var(--card); }
.blog-card.featured { grid-column: span 2; border-bottom: 1px solid var(--border); }
.blog-cat {
  font-family: 'Share Tech Mono', monospace;
  font-size: .58rem; color: var(--cyan);
  border: 1px solid rgba(0,212,255,.2);
  display: inline-block; padding: .2rem .6rem; margin-bottom: 1rem;
  letter-spacing: .15em;
}
.blog-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem; font-weight: 600; color: #fff;
  line-height: 1.4; margin-bottom: .7rem;
}
.blog-card.featured h3 { font-size: 1.4rem; }
.blog-card p { font-size: .78rem; color: var(--muted); line-height: 1.75; margin-bottom: 1.2rem; }
.blog-meta {
  display: flex; gap: 1.2rem; flex-wrap: wrap;
  font-family: 'Share Tech Mono', monospace; font-size: .58rem; color: var(--muted);
}

/* ── CTF ────────────────────────────────────── */
.ctf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
}
.ctf-card {
  background: var(--surface); padding: 2.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.ctf-card.live { background: rgba(0,212,255,.03); }
.ctf-status { font-family: 'Share Tech Mono', monospace; font-size: .6rem; letter-spacing: .15em; }
.live-badge     { color: var(--green); animation: blink-tag 1s step-end infinite; }
.upcoming-badge { color: var(--muted); }
.ctf-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.15rem; font-weight: 600; color: #fff;
}
.ctf-card p { font-size: .78rem; color: var(--muted); line-height: 1.75; }
.ctf-meta {
  display: flex; flex-direction: column; gap: .3rem;
  font-family: 'Share Tech Mono', monospace; font-size: .62rem; color: var(--muted);
}

/* ── CTA ────────────────────────────────────── */
.cta-box {
  border: 1px solid var(--border2);
  padding: 5rem 3rem; text-align: center;
  position: relative; overflow: hidden;
  background: var(--card);
}
.cta-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(0,212,255,.05), transparent);
}
.cta-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; color: #fff; line-height: 1.1;
  margin: 1rem 0;
}
.cta-title .accent { color: var(--cyan); }
.cta-sub {
  font-size: .88rem; color: var(--muted);
  max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.8;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.cta-perks {
  display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap;
  font-family: 'Share Tech Mono', monospace; font-size: .65rem; color: var(--green);
}

/* ── FOOTER ─────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border2);
  padding: 4rem 3rem 2rem;
  position: relative; z-index: 1;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: flex; align-items: center; gap: 1.5rem;
  margin-bottom: 3rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.footer-desc { font-size: .78rem; color: var(--muted); max-width: 360px; line-height: 1.7; }
.footer-links-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  margin-bottom: 3rem;
}
.footer-col { display: flex; flex-direction: column; gap: .6rem; }
.footer-col-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: .62rem; color: var(--cyan); letter-spacing: .2em;
  text-transform: uppercase; margin-bottom: .4rem;
}
.footer-col a {
  text-decoration: none; color: var(--muted);
  font-size: .78rem; transition: color .2s; cursor: none;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.footer-copy { font-size: .68rem; color: var(--muted); }
.footer-mono { font-family: 'Share Tech Mono', monospace; font-size: .6rem; color: var(--border2); }

/* ── FADE IN ────────────────────────────────── */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner    { grid-template-columns: 1fr; }
  .hero-right    { display: none; }
  .courses-grid  { grid-template-columns: 1fr 1fr; }
  .tools-grid    { grid-template-columns: repeat(2, 1fr); }
  .ctf-grid      { grid-template-columns: 1fr; }
  .blog-card.featured { grid-column: span 1; }
  .footer-links-grid  { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  nav { padding: .8rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 5rem 1.5rem; }
  .courses-grid { grid-template-columns: 1fr; }
  .blog-grid    { grid-template-columns: 1fr; }
  .tools-grid   { grid-template-columns: 1fr 1fr; }
  .hero-stats   { flex-direction: column; }
  .h-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .cta-box { padding: 3rem 1.5rem; }
  footer { padding: 3rem 1.5rem; }
  .footer-links-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
