:root {
  --bg-color: #0a0a12;
  --bg-card: rgba(18, 16, 35, 0.7);
  --primary: #FFD700;       /* Gold */
  --secondary: #C084FC;     /* Lilac */
  --tertiary: #06b6d4;      /* Cyan */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --accent: #3b82f6;
  --font-mono: 'Fira Code', 'Courier New', Courier, monospace;
  --font-sans: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle grid texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(192,132,252,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192,132,252,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Gold radial accent top-right */
body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,215,0,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ──────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-main);
}

.mono { font-family: var(--font-mono); }

.highlight-primary   { color: var(--primary); }
.highlight-secondary { color: var(--secondary); }
.highlight-tertiary  { color: var(--tertiary); }

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--tertiary);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ── Navigation ──────────────────────────────── */
nav {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(192, 132, 252, 0.2);
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}

.logo-ris {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.logo-al {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--secondary);
  letter-spacing: -0.03em;
}

.logo-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  margin-left: 0.6rem;
  text-transform: uppercase;
  align-self: center;
  border-left: 1px solid rgba(192,132,252,0.3);
  padding-left: 0.6rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  z-index: 1;
}

/* ── Hero ────────────────────────────────────── */
.hero {
  min-height: 82vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 4rem 0;
  position: relative;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
}

/*
  Pulse-blur sits at the seam between the two hero columns (left: 50%).
  Width is wider than the original (55vw) so it bleeds into both the
  text column and the terminal column equally. On mobile it collapses
  to a centered glow behind the stacked content.
*/
.hero::after {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75vw;
  height: 75vw;
  background: radial-gradient(
    circle,
    rgba(192, 132, 252, 0.13) 0%,
    rgba(255, 215, 0, 0.04) 40%,
    rgba(10, 10, 18, 0) 70%
  );
  z-index: 0;
  pointer-events: none;
  animation: pulse-blur 6s infinite ease-in-out;
}

/* Ensure hero children sit above the glow */
.hero-content,
.terminal-window {
  position: relative;
  z-index: 1;
}

@keyframes pulse-blur {
  0%   { transform: translate(-50%, -50%) scale(1);    opacity: 0.6; }
  50%  { transform: translate(-50%, -50%) scale(1.18); opacity: 1;   }
  100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.6; }
}

.hero-eyebrow {
  font-size: 0.85rem;
  color: var(--tertiary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero-title-sub {
  font-size: 2rem;
  color: var(--text-muted);
  letter-spacing: 0.35em;
  font-weight: 300;
}

.hero-subtitle {
  font-family: var(--font-mono);
  color: var(--secondary);
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* ── Sys Stats ───────────────────────────────── */
.sys-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: center;
  background: var(--bg-card);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(192, 132, 252, 0.1);
  backdrop-filter: blur(10px);
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-item span {
  display: block;
  color: var(--text-main);
  margin-top: 0.2rem;
  font-size: 0.85rem;
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  margin-right: 0.4rem;
  box-shadow: 0 0 8px var(--primary);
  animation: pulse-dot 2s infinite;
}

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

/* ── Services ────────────────────────────────── */
.services {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

@property --border-angle {
  syntax: "<angle>";
  initial-value: 0turn;
  inherits: false;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  z-index: 1;
}

.service-card::before,
.nav-links a::before,
.form-group .input-wrapper::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--border-angle),
    transparent 40%,
    var(--primary) 65%,
    var(--secondary) 80%,
    var(--tertiary) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.nav-links a::before { inset: 0px; }

@keyframes border-spin {
  to { --border-angle: 1turn; }
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.08);
}

.service-card:hover::before,
.nav-links a:hover::before,
.form-group .input-wrapper:focus-within::before {
  opacity: 1;
  animation: border-spin 2s linear infinite;
}

.service-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

/* Service card bg code */
.card-bg-code {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  font-size: 0.75rem;
  color: var(--tertiary);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  white-space: pre-wrap;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(10px);
}

.service-card:hover .card-bg-code {
  opacity: 0.12;
  transform: translateY(0);
}

.card-content {
  position: relative;
  z-index: 10;
}

/* ── Architecture ────────────────────────────── */
.architecture {
  padding: 5rem 0;
}

.code-panes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* ── Terminal / Code Windows ─────────────────── */
.terminal-window, .code-window {
  background: #07060f;
  border: 1px solid rgba(192, 132, 252, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.terminal-header {
  background: #110f1e;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  margin-right: 1rem;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #27c93f; }

.terminal-title {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-grow: 1;
  text-align: center;
}

.terminal-body {
  padding: 1.5rem;
  color: var(--text-main);
  line-height: 1.8;
}

.terminal-body p { margin-bottom: 0.5rem; }

.code-window pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  color: var(--text-main);
}

.code-window .text-muted { color: var(--text-muted); }

/* ── Animations ──────────────────────────────── */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.1s forwards;
}

.fade-in.delay-1 { animation-delay: 1s; }
.fade-in.delay-2 { animation-delay: 2s; }
.fade-in.delay-3 { animation-delay: 3s; }
.fade-in.delay-4 { animation-delay: 4s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

.cursor {
  display: inline-block;
  width: 10px;
  background: var(--text-main);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Contact ─────────────────────────────────── */
.contact {
  padding: 5rem 0;
  background: linear-gradient(to top, rgba(10,10,18,1), rgba(18,16,35,0.3));
}

.form-group { margin-bottom: 1.5rem; }

.form-group .input-wrapper {
  position: relative;
  border-radius: 6px;
  z-index: 1;
}

.form-group .input-wrapper:focus-within > input,
.form-group .input-wrapper:focus-within > textarea {
  border-color: transparent !important;
}

input, textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(192,132,252,0.3);
  border-radius: 6px;
  color: white;
  font-family: var(--font-sans);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--tertiary);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.2);
}

button[type="submit"] {
  background: var(--primary);
  color: var(--bg-color);
  border: none;
  padding: 1rem 2rem;
  font-weight: bold;
  font-family: var(--font-mono);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

button[type="submit"]:hover {
  background: var(--tertiary);
  color: var(--bg-color);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

/* ── Footer ──────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Desktop alignment ───────────────────────── */
@media (min-width: 961px) {
  .hero-title,
  .hero-subtitle,
  .hero-eyebrow {
    text-align: left;
  }
  .sys-stats {
    justify-content: flex-start;
  }
}
