:root {
  --bg: #080b16;
  --bg-elevated: #0e1428;
  --bg-card: #121a34;
  --border: #223058;
  --border-soft: #1a2444;
  --text: #e7ecf7;
  --text-muted: #8894b8;
  --accent: #5b8cff;
  --accent-soft: #3a5ecc;
  --accent-2: #38e0c0;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Manrope', 'Segoe UI', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(91, 140, 255, 0.14), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(56, 224, 192, 0.10), transparent 45%);
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  font-family: var(--mono);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
  display: inline-block;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 4rem);
  background: rgba(8, 11, 22, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(91, 140, 255, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.2rem, 5vw, 4rem);
  max-width: 1240px;
  margin: 0 auto;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  margin-bottom: 1.1rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 34ch;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-primary,
.btn-secondary {
  font-family: var(--mono);
  font-size: 0.92rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #06101f;
  font-weight: 700;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(91, 140, 255, 0.28);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

/* ---------- Terminal signature ---------- */

.terminal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}

.tdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.tdot-red { background: #ff5f57; }
.tdot-yellow { background: #febc2e; }
.tdot-green { background: #28c840; }

.terminal-title {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.4rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.92rem;
}

.terminal-body p {
  margin: 0 0 0.55rem;
}

.prompt {
  color: var(--accent-2);
  margin-right: 0.5rem;
}

.output {
  color: var(--text-muted);
  padding-left: 1.4rem;
  overflow-wrap: break-word;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1rem;
  background: var(--accent-2);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

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

/* ---------- Section shell ---------- */

main section {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 4rem);
}

.section-heading {
  margin-bottom: 2.2rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

/* ---------- Stack ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
}

.stack-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 1.4rem 1.3rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stack-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-3px);
}

.stack-name {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.stack-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Services ---------- */

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

.service-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-elevated));
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}

.service-index {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  opacity: 0.75;
}

.service-card h3 {
  font-size: 1.3rem;
  margin: 0.6rem 0 0.8rem;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Contact ---------- */

.contact-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 2rem clamp(1.4rem, 4vw, 2.4rem);
  max-width: 640px;
}

.contact-terminal p:first-child {
  font-family: var(--mono);
  color: var(--text-muted);
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}

.contact-email {
  font-family: var(--mono);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--accent-2);
  border-bottom: 1px dashed var(--accent-soft);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-email:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.contact-note {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.8rem clamp(1.2rem, 5vw, 4rem) 2.4rem;
  max-width: 1240px;
  margin: 0 auto;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: clamp(2rem, 8vw, 3rem);
  }

  .nav-links {
    display: none;
  }

  .terminal-body {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .nav {
    padding: 0.9rem 1.1rem;
  }

  .nav-cta {
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
  }

  .hero-text h1 {
    font-size: 2.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }

  .terminal-body {
    font-size: 0.78rem;
    padding: 1.1rem 1.1rem;
  }

  .terminal-body .output {
    padding-left: 1rem;
  }

  .service-card,
  .contact-terminal {
    padding: 1.5rem;
  }

  .footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .hero-text h1 {
    font-size: 1.85rem;
  }

  .nav-logo {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor {
    animation: none;
    opacity: 1;
  }

  .btn-primary:hover,
  .stack-card:hover {
    transform: none;
  }
}