/* ============================================
   uci.kod — The Neon Architect Design System
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Surface */
  --surface: #060e20;
  --surface-container-lowest: #000000;
  --surface-container-low: #091328;
  --surface-container: #0f1930;
  --surface-container-high: #141f38;
  --surface-container-highest: #192540;
  --surface-variant: #192540;
  --surface-bright: #1f2b49;

  /* Primary — Electric Indigo */
  --primary: #a3a6ff;
  --primary-dim: #6063ee;
  --primary-container: #9396ff;
  --on-primary: #0f00a4;
  --on-primary-fixed: #000000;

  /* Secondary — Cyan */
  --secondary: #53ddfc;
  --secondary-dim: #40ceed;
  --secondary-container: #00687a;
  --on-secondary: #004b58;
  --on-secondary-container: #ecfaff;

  /* Tertiary — Amber */
  --tertiary: #ffb148;
  --tertiary-dim: #e79400;
  --tertiary-container: #f8a010;
  --on-tertiary: #573500;

  /* Neutral */
  --on-surface: #dee5ff;
  --on-surface-variant: #a3aac4;
  --on-background: #dee5ff;
  --outline: #6d758c;
  --outline-variant: #40485d;

  /* Error */
  --error: #ff6e84;
  --error-dim: #d73357;

  /* Typography */
  --font-headline: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-label: 'Space Grotesk', sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

::selection {
  background: rgba(163, 166, 255, 0.3);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p {
  color: var(--on-surface-variant);
  max-width: 65ch;
}

.label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-24) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(6, 14, 32, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(222, 229, 255, 0.06);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--on-surface);
  transition: color 0.2s;
}
.nav-logo:hover {
  color: var(--primary);
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}

.nav-links a {
  font-family: var(--font-headline);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(222, 229, 255, 0.6);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.lang-switch {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--on-surface-variant);
  display: flex;
  gap: var(--space-1);
  align-items: center;
}
.lang-switch a {
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  transition: all 0.2s;
}
.lang-switch a:hover {
  color: var(--on-surface);
}
.lang-switch a.active {
  background: var(--surface-container-high);
  color: var(--secondary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(6, 14, 32, 0.95);
  backdrop-filter: blur(20px);
  z-index: 40;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-8);
}
.nav-mobile.open {
  display: flex;
}
.nav-mobile a {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--on-surface);
  transition: color 0.2s;
}
.nav-mobile a:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-8);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: var(--on-primary-fixed);
}
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(163, 166, 255, 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--on-surface);
  border: 1px solid var(--outline-variant);
}
.btn-secondary:hover {
  background: var(--surface-container-high);
  border-color: var(--primary);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: 1.05rem;
}

/* --- Cards --- */
.card {
  background: var(--surface-container);
  border-radius: 12px;
  padding: var(--space-8);
  border: 1px solid rgba(64, 72, 93, 0.1);
  transition: all 0.4s;
}
.card:hover {
  border-color: rgba(163, 166, 255, 0.3);
}

/* --- Glass Panel --- */
.glass {
  background: rgba(25, 37, 64, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- Terminal --- */
.terminal {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(64, 72, 93, 0.2);
  box-shadow: 0 0 20px rgba(163, 166, 255, 0.08);
}
.terminal-header {
  background: var(--surface-container-highest);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.terminal-dots {
  display: flex;
  gap: var(--space-2);
}
.terminal-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: rgba(215, 51, 87, 0.4); }
.terminal-dots span:nth-child(2) { background: rgba(255, 177, 72, 0.4); }
.terminal-dots span:nth-child(3) { background: rgba(83, 221, 252, 0.4); }
.terminal-title {
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  opacity: 0.6;
}
.terminal-body {
  padding: var(--space-6);
  font-family: var(--font-label);
  font-size: 0.9rem;
  line-height: 1.8;
  background: rgba(0, 0, 0, 0.3);
}
.terminal-line {
  display: flex;
  gap: var(--space-4);
}
.terminal-num {
  color: var(--secondary);
  opacity: 0.4;
  user-select: none;
  min-width: 1.5rem;
  text-align: right;
}

/* --- Tags / Pills --- */
.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: var(--surface-container-highest);
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Status Badge --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: var(--surface-container-high);
  border: 1px solid rgba(64, 72, 93, 0.2);
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
}
.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Background Blobs --- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.blob-primary {
  background: rgba(163, 166, 255, 0.08);
}
.blob-secondary {
  background: rgba(83, 221, 252, 0.08);
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(222, 229, 255, 0.05);
  background: var(--surface);
  padding: var(--space-12) 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: center;
  text-align: center;
}
.footer-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}
.footer-links a {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(222, 229, 255, 0.3);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-copy {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(222, 229, 255, 0.25);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* --- Utilities --- */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-tertiary { color: var(--tertiary); }
.text-muted { color: var(--on-surface-variant); }
.text-center { text-align: center; }
.text-left { text-align: left; }

.bg-low { background: var(--surface-container-low); }
.bg-container { background: var(--surface-container); }
.bg-high { background: var(--surface-container-high); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.max-w-lg { max-width: 36rem; }
.max-w-xl { max-width: 48rem; }
.max-w-2xl { max-width: 56rem; }
.max-w-4xl { max-width: 64rem; }
.w-full { width: 100%; }

.pt-20 { padding-top: 5rem; }

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Blog --- */
.blog-card {
  display: block;
  padding: var(--space-6);
  background: var(--surface-container);
  border-radius: 12px;
  border: 1px solid rgba(64, 72, 93, 0.1);
  transition: all 0.3s;
}
.blog-card:hover {
  border-color: rgba(163, 166, 255, 0.3);
  transform: translateY(-2px);
}
.blog-card time {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
}
.blog-card h3 {
  margin-top: var(--space-3);
  font-size: 1.25rem;
}
.blog-card p {
  margin-top: var(--space-2);
  font-size: 0.9rem;
}

/* --- Blog Post Content --- */
.prose {
  max-width: 72ch;
  margin: 0 auto;
}
.prose h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}
.prose h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.prose p {
  margin-bottom: var(--space-4);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: none;
}
.prose ul, .prose ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
  color: var(--on-surface-variant);
}
.prose li {
  margin-bottom: var(--space-2);
}
.prose code {
  font-family: var(--font-label);
  background: var(--surface-container-high);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--secondary);
}
.prose pre {
  background: var(--surface-container-lowest);
  padding: var(--space-4);
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: var(--space-4);
}
.prose pre code {
  background: none;
  padding: 0;
}
