/* ============================================================
   Nexus Digital Solutions — public styles
   Palette: deep-space navy / cyan / violet
   Type: Sora (display) · IBM Plex Sans (body) · IBM Plex Mono (labels)
   ============================================================ */
:root {
  --bg: #050b1a;
  --surface: #0a1226;
  --surface-2: #0e1830;
  --line: rgba(140, 170, 255, 0.13);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --text: #e8eefb;
  --muted: #93a3bd;
  --ok: #34d399;
  --radius: 10px;
  --display: 'Sora', sans-serif;
  --body: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }

/* faint blueprint grid */
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(140,170,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,170,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 11, 26, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
  color: var(--cyan); font-size: 1.05rem;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.7));
}
.brand-text {
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: 0.14em; display: flex; flex-direction: column; line-height: 1.05;
}
.brand-sub {
  font-family: var(--mono); font-weight: 400; font-size: 0.55rem;
  letter-spacing: 0.34em; color: var(--muted);
}
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  color: var(--muted); font-size: 0.92rem; font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--text); }
.main-nav a.nav-cta {
  color: var(--bg); background: var(--cyan);
  padding: 9px 18px; border-radius: 7px; font-weight: 600;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}
.main-nav a.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 26px rgba(34,211,238,.55); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.25s; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: 0.78rem; color: var(--cyan);
  letter-spacing: 0.08em; margin-bottom: 18px; display: block;
}
.eyebrow::before { content: '// '; color: var(--violet); }
h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 20px;
}
h1 .hl {
  background: linear-gradient(92deg, var(--cyan), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); max-width: 46ch; margin-bottom: 32px; font-size: 1.05rem; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; transition: transform 0.15s, box-shadow 0.2s, border-color .2s;
}
.btn-primary {
  background: var(--cyan); color: var(--bg);
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(34,211,238,.55); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); }

/* signature: engineering console */
.console {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.console-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.console-bar i:first-child { background: rgba(248, 113, 113, 0.7); }
.console-bar i:nth-child(2) { background: rgba(251, 191, 36, 0.7); }
.console-bar i:nth-child(3) { background: rgba(52, 211, 153, 0.7); }
.console-bar .mono { margin-left: auto; color: var(--muted); }
.console-body { padding: 20px 22px; font-family: var(--mono); font-size: 0.82rem; line-height: 2.1; min-height: 235px; }
.console-body .ln { display: block; color: var(--muted); opacity: 0; animation: lineIn 0.4s forwards; }
.console-body .ln b { color: var(--cyan); font-weight: 500; }
.console-body .ln .ok { color: var(--ok); }
.console-body .ln:nth-child(1) { animation-delay: 0.2s; }
.console-body .ln:nth-child(2) { animation-delay: 0.8s; }
.console-body .ln:nth-child(3) { animation-delay: 1.4s; }
.console-body .ln:nth-child(4) { animation-delay: 2.0s; }
.console-body .ln:nth-child(5) { animation-delay: 2.6s; }
.console-body .ln:nth-child(6) { animation-delay: 3.2s; }
.console-body .cursor {
  display: inline-block; width: 8px; height: 15px; background: var(--cyan);
  vertical-align: middle; animation: blink 1s steps(1) infinite;
}
@keyframes lineIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .console-body .ln { animation: none; opacity: 1; }
  .console-body .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- sections ---------- */
.section { padding: 84px 0; }
.section-head { margin-bottom: 46px; max-width: 620px; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* service cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; transition: border-color 0.25s, transform 0.25s;
}
.card:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-4px); }
.card .icon { font-size: 1.4rem; color: var(--cyan); margin-bottom: 16px; }
.card h3 { font-family: var(--display); font-size: 1.08rem; font-weight: 600; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.93rem; }
.card .tag { font-family: var(--mono); font-size: 0.7rem; color: var(--violet); display: block; margin-top: 16px; }

/* projects */
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.proj {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color 0.25s, transform 0.25s; display: flex; flex-direction: column;
}
.proj:hover { border-color: rgba(167, 139, 250, 0.5); transform: translateY(-4px); }
.proj-thumb {
  aspect-ratio: 16 / 8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line); position: relative; overflow: hidden;
}
.proj-thumb::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.proj-icon {
  width: 42px; height: 42px; position: relative; z-index: 1; opacity: 0.92;
}
.proj-thumb span.proj-thumb-label { position: relative; z-index: 1; }
.thumb-hangal { background: linear-gradient(135deg, #123, #1a2f55); color: #7dd3fc; }
.thumb-kataka { background: linear-gradient(135deg, #2a0e0e, #4a1a10); color: #fca5a5; }
.thumb-photo  { background: linear-gradient(135deg, #101418, #23262e); color: #d1d5db; }
.thumb-ehr    { background: linear-gradient(135deg, #0e2a22, #124038); color: #6ee7b7; }
.proj-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.proj-body .mono-top { font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); margin-bottom: 10px; }
.proj-body h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.proj-body p { color: var(--muted); font-size: 0.93rem; flex: 1; }
.proj-links { margin-top: 18px; display: flex; gap: 16px; align-items: center; }
.proj-links a { font-family: var(--mono); font-size: 0.8rem; }
.proj-links a:hover { text-decoration: underline; }
.badge {
  font-family: var(--mono); font-size: 0.68rem; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
}
.badge.live { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }

/* process strip */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { border-left: 2px solid var(--line); padding: 4px 0 4px 18px; }
.step .mono { color: var(--cyan); display: block; margin-bottom: 8px; }
.step h4 { font-family: var(--display); font-size: 0.98rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.87rem; }

/* CTA band */
.cta-band {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(167,139,250,.08)), var(--surface);
  padding: 52px 44px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: var(--muted); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); padding: 12px 14px;
  font-family: var(--body); font-size: 0.95rem; transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); }
textarea { min-height: 150px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 22px; font-size: 0.93rem; }
.alert-ok { background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.4); color: var(--ok); }
.alert-err { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.4); color: #fca5a5; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 44px; align-items: start; }
.contact-info .card { margin-bottom: 16px; }
.contact-info .card a { font-size: 0.95rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--surface); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding: 56px 24px 40px;
}
.footer-col h4 { font-size: 0.75rem; color: var(--cyan); margin-bottom: 16px; letter-spacing: 0.08em; }
.footer-col a { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 9px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 16px; max-width: 34ch; }
.footer-loc { color: var(--violet) !important; margin-top: 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: 0.82rem;
}
.dot-live {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 8px var(--ok); margin: 0 2px;
}

/* page hero (inner pages) */
.page-hero { padding: 72px 0 22px; }
.page-hero p { color: var(--muted); max-width: 58ch; }

/* about */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.stat b { font-family: var(--display); font-size: 1.9rem; display: block; color: var(--cyan); }
.stat span { color: var(--muted); font-size: 0.88rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .proj-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: 68px; right: 0; bottom: 0; width: min(78vw, 320px);
    background: var(--surface); border-left: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 34px 28px; gap: 22px;
    transform: translateX(100%); transition: transform 0.3s;
  }
  .main-nav.open { transform: translateX(0); }
  .hero { padding: 60px 0 40px; }
}
