/* ============================================
   TEEN PROTOCOL — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --onyx:       #0B0E14;
  --carbon:     #141720;
  --panel:      #1A1D26;
  --border:     rgba(0, 243, 255, 0.15);
  --cyan:       #00F3FF;
  --yellow:     #FCEE09;
  --magenta:    #FF00FF;
  --teal:       #4ECCA3;
  --ice:        #E0E6ED;
  --muted:      rgba(224, 230, 237, 0.5);
  --cyan-glow:  rgba(0, 243, 255, 0.35);
  --cyan-dim:   rgba(0, 243, 255, 0.08);
  --mag-dim:    rgba(255, 0, 255, 0.08);
  --yellow-dim: rgba(252, 238, 9, 0.08);
  --teal-dim:   rgba(78, 204, 163, 0.08);
  --nav-h:      64px;
  --radius:     2px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--onyx);
  color: var(--ice);
  font-family: 'Rajdhani', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: default;
}

/* Scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.035) 3px,
    rgba(0,0,0,0.035) 4px
  );
  pointer-events: none;
  z-index: 9000;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Orbitron', monospace;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.mono { font-family: 'Share Tech Mono', monospace; }

/* ── UTILITY ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.tag {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}

.tag-cyan    { color: var(--cyan);    background: var(--cyan-dim); }
.tag-yellow  { color: var(--yellow);  background: var(--yellow-dim); }
.tag-magenta { color: var(--magenta); background: var(--mag-dim); }
.tag-teal    { color: var(--teal);    background: var(--teal-dim); }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(11, 14, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-shadow: 0 0 24px var(--cyan-glow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .cursor {
  color: var(--magenta);
  animation: blink 1s step-end infinite;
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--cyan); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-links .coming-soon {
  color: rgba(224,230,237,0.25);
  cursor: not-allowed;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
}

.nav-links .coming-soon::before {
  content: 'SOON';
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--magenta);
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links .coming-soon:hover::before { opacity: 1; }

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

.btn {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 22px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius);
}

.btn-ghost {
  background: none;
  border: 1px solid rgba(224,230,237,0.2);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-primary {
  background: var(--cyan);
  color: var(--onyx);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.btn-primary:hover {
  background: var(--yellow);
  box-shadow: 0 0 20px rgba(252,238,9,0.4);
}

/* ── TICKER ── */
.ticker-wrap {
  background: var(--cyan);
  overflow: hidden;
  height: 32px;
  display: flex;
  align-items: center;
}

.ticker-inner {
  display: flex;
  animation: ticker 30s linear infinite;
  white-space: nowrap;
}

.ticker-inner span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--onyx);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0 32px;
}

.ticker-inner .dot {
  color: var(--magenta);
  padding: 0;
}

/* ── CARDS ── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  position: relative;
}

.card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--carbon);
}

/* Image placeholder with grid pattern */
.card-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background:
    linear-gradient(rgba(0,243,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,243,255,0.05) 1px, transparent 1px),
    var(--carbon);
  background-size: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.card-body { padding: 20px; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card-title {
  font-family: 'Orbitron', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--ice);
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(224,230,237,0.35);
  letter-spacing: 0.05em;
}

.read-more {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.read-more:hover { gap: 10px; }
.read-more::after { content: '→'; }

/* ── SECTION HEADER ── */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.section-label::before { content: '> '; color: var(--magenta); }

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  color: var(--ice);
}

.section-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-link:hover { color: var(--cyan); }
.section-link::after { content: '→'; }

/* ── GRID LAYOUTS ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-featured {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* ── FOOTER ── */
.footer {
  margin-top: 80px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-logo {
  font-family: 'Orbitron', monospace;
  font-size: 20px;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px var(--cyan-glow);
  margin-bottom: 14px;
}

.footer-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--ice); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(224,230,237,0.25);
  letter-spacing: 0.05em;
}

/* ── ANIMATIONS ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes grid-drift {
  to { background-position: 60px 60px; }
}

@keyframes glitch {
  0%,90%,100% { transform: translateX(0); opacity: 0; }
  91%          { transform: translateX(-4px); opacity: 0.6; }
  93%          { transform: translateX(3px);  opacity: 0.6; }
  95%          { transform: translateX(0);    opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--cyan-glow); }
  50%       { box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(0,243,255,0.1); }
}

.animate-in {
  opacity: 0;
  animation: fadein 0.6s ease forwards;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .grid-3, .grid-featured { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ── AUTH NAV USER PILL ── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-user-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.nav-actions a {
  text-decoration: none;
}
