/* ===================================================
   KE9DTJ Ham Radio — style.css
   Dark, premium, radio-themed design
   =================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --color-bg:       #0a0e1a;   /* deep navy */
  --color-bg-2:     #0d1221;
  --color-bg-3:     #111827;
  --color-surface:  #141d2e;
  --color-border:   #1e2d47;
  --color-amber:    #f59e0b;
  --color-amber-d:  #d97706;
  --color-green:    #22c55e;
  --color-green-d:  #16a34a;
  --color-red:      #ef4444;
  --color-red-d:    #dc2626;
  --color-text:     #e2e8f0;
  --color-text-2:   #94a3b8;
  --color-text-3:   #64748b;
  --radius:         0.75rem;
  --radius-sm:      0.4rem;
  --shadow:         0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow:    0 0 20px rgba(245,158,11,0.15);
  --transition:     0.25s ease;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--color-amber); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-amber-d); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { color: var(--color-text-2); }

/* ---------- LAYOUT ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow { max-width: 800px; }
.page-main { flex: 1; }
.section { padding: 5rem 0; }
.section.bg-alt { background: var(--color-bg-2); }

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-site-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--color-text-3);
  letter-spacing: 0.05em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-2);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-amber);
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-amber);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text-2);
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- CALLSIGN BADGE ---------- */
.callsign-badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1rem;
  color: var(--color-amber);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(245,158,11,0.4);
}
.callsign-badge.sm { font-size: 0.8rem; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(245,158,11,0.06) 0%, transparent 65%),
              radial-gradient(ellipse at 80% 20%, rgba(34,197,94,0.04) 0%, transparent 50%),
              var(--color-bg);
}
.hero-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  opacity: 0.4;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}
.hero-callsign-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.hero-callsign {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(3rem, 10vw, 7rem);
  color: var(--color-amber);
  text-shadow: 0 0 40px rgba(245,158,11,0.5), 0 0 80px rgba(245,158,11,0.2);
  letter-spacing: 0.15em;
  animation: glow-pulse 3s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 30px rgba(245,158,11,0.4), 0 0 60px rgba(245,158,11,0.1); }
  50%       { text-shadow: 0 0 50px rgba(245,158,11,0.7), 0 0 100px rgba(245,158,11,0.3); }
}
.hero-class {
  font-size: 1rem;
  color: var(--color-green);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-2);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}
.hero-wave svg { display: block; width: 100%; }

/* ---------- SIGNAL BARS ---------- */
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 2.5rem;
}
.signal-bars.right .bar { animation-delay-override: true; }
.bar {
  width: 6px;
  background: var(--color-green);
  border-radius: 2px;
  opacity: 0.7;
  animation: signal-animate 1.4s ease-in-out infinite;
}
.bar:nth-child(1) { height: 30%; animation-delay: 0.0s; }
.bar:nth-child(2) { height: 50%; animation-delay: 0.1s; }
.bar:nth-child(3) { height: 80%; animation-delay: 0.2s; }
.bar:nth-child(4) { height: 60%; animation-delay: 0.3s; }
.bar:nth-child(5) { height: 40%; animation-delay: 0.4s; }
.signal-bars.right .bar:nth-child(1) { animation-delay: 0.4s; }
.signal-bars.right .bar:nth-child(2) { animation-delay: 0.3s; }
.signal-bars.right .bar:nth-child(3) { animation-delay: 0.2s; }
.signal-bars.right .bar:nth-child(4) { animation-delay: 0.1s; }
.signal-bars.right .bar:nth-child(5) { animation-delay: 0.0s; }
@keyframes signal-animate {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-amber);
  color: #000;
  border-color: var(--color-amber);
}
.btn-primary:hover {
  background: var(--color-amber-d);
  border-color: var(--color-amber-d);
  color: #000;
  box-shadow: 0 0 20px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--color-amber);
  border-color: var(--color-amber);
}
.btn-outline:hover {
  background: rgba(245,158,11,0.1);
  color: var(--color-amber);
  box-shadow: var(--shadow-glow);
}
.btn-emergency {
  background: var(--color-red);
  color: #fff;
  border-color: var(--color-red);
}
.btn-emergency:hover {
  background: var(--color-red-d);
  border-color: var(--color-red-d);
  color: #fff;
  box-shadow: 0 0 20px rgba(239,68,68,0.4);
}
.btn.sm { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.btn.full-width { width: 100%; justify-content: center; }

/* ---------- CARDS ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  border-color: rgba(245,158,11,0.3);
  box-shadow: var(--shadow-glow), var(--shadow);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cards-grid.two-col {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}
.card-icon.large { font-size: 2.5rem; }

/* Band cards */
.band-card h3 { color: var(--color-amber); margin-bottom: 0.5rem; }
.band-card:hover { transform: translateY(-3px); }

/* Link cards */
.link-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.link-card:hover { transform: translateY(-3px); }
.link-card h3 { color: var(--color-text); margin-bottom: 0.25rem; }
.link-card p { font-size: 0.9rem; }
.card-arrow {
  margin-left: auto;
  font-size: 1.5rem;
  color: var(--color-amber);
  transition: transform var(--transition);
}
.link-card:hover .card-arrow { transform: translateX(5px); }

/* Link detail cards */
.link-detail-card { display: flex; flex-direction: column; gap: 1.25rem; }
.link-card-header { display: flex; gap: 1rem; align-items: flex-start; }
.link-card-header .link-icon { font-size: 2.5rem; flex-shrink: 0; }
.link-card-header h2 { font-size: 1.4rem; color: var(--color-text); margin-bottom: 0.4rem; }
.link-card-header p { font-size: 0.9rem; }
.link-desc { font-size: 0.9rem; color: var(--color-text-2); }
.link-features { display: flex; flex-direction: column; gap: 0.5rem; }
.link-features li { font-size: 0.9rem; color: var(--color-text-2); padding-left: 0; }
.link-detail-card.emergency { border-color: rgba(239,68,68,0.2); }
.link-detail-card.emergency:hover { border-color: rgba(239,68,68,0.5); box-shadow: 0 0 20px rgba(239,68,68,0.12); }

/* Project cards */
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.project-card:hover { transform: translateY(-3px); }
.project-card h3 { color: var(--color-text); }
.project-card p { font-size: 0.9rem; flex: 1; }
.project-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-date { font-family: 'Share Tech Mono', monospace; font-size: 0.8rem; color: var(--color-text-3); margin-top: auto; }

/* ---------- BADGES & TAGS ---------- */
.badge {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(34,197,94,0.1);
  color: var(--color-green);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 999px;
  margin-top: 0.5rem;
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(245,158,11,0.08);
  color: var(--color-amber);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 999px;
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- SECTION HEADINGS ---------- */
.section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}
.section-sub {
  text-align: center;
  color: var(--color-text-2);
  max-width: 560px;
  margin: 0 auto 3rem;
}
.accent { color: var(--color-amber); }
.section-cta { text-align: center; margin-top: 2.5rem; }

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  padding: 5rem 0 3rem;
  background: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border);
}
.page-title { margin-bottom: 0.5rem; }
.page-sub { color: var(--color-text-2); font-size: 1.1rem; }
.back-link { font-size: 0.9rem; color: var(--color-text-3); margin-bottom: 1rem; display: inline-block; }
.back-link:hover { color: var(--color-amber); }

/* ---------- ABOUT PAGE ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.about-card h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.2rem; color: var(--color-amber); margin-bottom: 1rem; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; }
.info-list dt { color: var(--color-text-3); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; align-self: center; }
.info-list dd { color: var(--color-text); font-family: 'Share Tech Mono', monospace; }
.gear-list { display: flex; flex-direction: column; gap: 0.5rem; }
.gear-list li { color: var(--color-text-2); font-size: 0.95rem; }
.gear-note { font-size: 0.8rem; color: var(--color-text-3); margin-top: 1rem; font-style: italic; }

/* ---------- MARKDOWN BODY ---------- */
.markdown-body { color: var(--color-text-2); line-height: 1.8; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: var(--color-text); margin: 1.5rem 0 0.75rem; }
.markdown-body p { margin-bottom: 1rem; }
.markdown-body code {
  font-family: 'Share Tech Mono', monospace;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-green);
}
.markdown-body pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.markdown-body pre code { background: none; border: none; padding: 0; }
.markdown-body blockquote {
  border-left: 3px solid var(--color-amber);
  padding-left: 1rem;
  color: var(--color-text-3);
  font-style: italic;
  margin-bottom: 1rem;
}
.markdown-body ul, .markdown-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.markdown-body ul li { list-style: disc; color: var(--color-text-2); }
.markdown-body ol li { list-style: decimal; color: var(--color-text-2); }
.post-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }

/* ---------- MISC ---------- */
.notice-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-2);
}
.empty-state {
  text-align: center;
  padding: 4rem 0;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { margin-bottom: 0.5rem; }
.empty-state a { color: var(--color-amber); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}
.pagination-info { color: var(--color-text-3); font-size: 0.9rem; }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-bg-2);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-callsign { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; color: var(--color-text-3); }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { font-size: 0.9rem; color: var(--color-text-3); }
.footer-links a:hover { color: var(--color-amber); }
.footer-copy { font-size: 0.8rem; color: var(--color-text-3); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    padding: 1rem;
    background: rgba(10,14,26,0.98);
    border-bottom: 1px solid var(--color-border);
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-link { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); }
  .navbar { position: relative; }
  .hero-callsign-wrap { gap: 0.75rem; }
  .signal-bars { display: none; }
  .cards-grid.two-col { grid-template-columns: 1fr; }
  .link-card { flex-direction: column; }
}
