
:root {
  --bg: #0b1020;
  --bg-alt: #141a2a;
  --card-bg: #181f32;
  --text: #f5f7ff;
  --muted: #a3acc7;
  --accent: #4ea1ff;
  --accent-soft: rgba(78, 161, 255, 0.15);
  --border-subtle: #22293c;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.5);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, #1a2440 0, #050814 55%, #020308 100%);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: linear-gradient(to right, rgba(5, 8, 20, 0.95), rgba(7, 11, 26, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
}

.brand a {
  font-weight: 650;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
}

.nav-links a {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  white-space: nowrap;
}

.nav-links a:hover {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.page-header {
  padding: 2.5rem 0 1.5rem;
}

.page-header h1 {
  font-size: clamp(1.9rem, 2.2vw + 1.6rem, 2.5rem);
  margin-bottom: 0.4rem;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

main {
  padding-bottom: 3rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.two-col {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .two-col,
  .three-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: radial-gradient(circle at top left, #253055 0, #101629 55%, #070b14 100%);
  border-radius: var(--radius-xl);
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.hero-grid {
  align-items: stretch;
}

.hero-grid > .card {
  border-image: linear-gradient(135deg, rgba(78, 161, 255, 0.6), rgba(167, 93, 255, 0.1)) 1;
  border-width: 1px;
}

.quick-links .card {
  position: relative;
  overflow: hidden;
}

.quick-links .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}

.button {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4ea1ff, #a75dff);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.button:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.timeline {
  border-left: 2px solid var(--border-subtle);
  margin-left: 0.35rem;
  padding-left: 1.25rem;
}

.timeline-item {
  position: relative;
  padding: 0.4rem 0 0.8rem;
}

.timeline-date {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.timeline-body {
  background: radial-gradient(circle at top left, rgba(78, 161, 255, 0.12), transparent 60%);
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.35rem;
  top: 0.75rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

h2 {
  font-size: 1.3rem;
  margin-top: 0;
}

h3 {
  font-size: 1.05rem;
}

p {
  color: var(--muted);
}

ul {
  color: var(--muted);
}

dl.glossary {
  margin: 0;
}

.glossary dt {
  font-weight: 600;
  margin-top: 0.8rem;
}

.glossary dd {
  margin-left: 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.4rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* --- Improved Mobile Navigation --- */
@media (max-width: 820px) {
  .nav-container {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
  }
}

/* Hide honeypot spam field */
.hidden-field {
  display: none !important;
}

/* Form styling */
.contact-form .form-group {
  margin-bottom: 1.3rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #f3f3f3;
}

/* Inputs + textareas */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Inputs focus glow */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #a786ff;
  box-shadow: 0 0 8px rgba(167,134,255,0.7);
}

/* Button styling (matches cosmic theme) */
.contact-form button.button {
  background: linear-gradient(135deg, #7f5cff, #a786ff);
  color: white;
  border: none;
  padding: 0.7rem 1.4rem;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
}

.contact-form button.button:hover {
  background: linear-gradient(135deg, #9676ff, #baa4ff);
}
