:root {
  --bg: #050712;
  --bg-alt: #0b0f1f;
  --card-bg: #0f172a;
  --accent: #3b82f6;
  --accent-soft: #60a5fa;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius: 12px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.8);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text);
  font-family: var(--font-main);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

/* Layout */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 640px;
  color: var(--muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.6), transparent);
  border-bottom: 1px solid rgba(31, 41, 55, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-soft);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
}

/* Buttons & links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: radial-gradient(circle at top left, var(--accent-soft), var(--accent));
  color: #0b1120;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.6);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  box-shadow: none;
}

.link-arrow {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 500;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.3rem, 3vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text p {
  color: var(--muted);
  max-width: 560px;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
}

.hero-card {
  background: radial-gradient(circle at top, #111827, #020617);
  border-radius: 18px;
  padding: 1.4rem;
  border: 1px solid rgba(55, 65, 81, 0.8);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-code-line {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.7));
  margin-bottom: 0.7rem;
  width: 70%;
}

.hero-code-line.wide {
  width: 90%;
}

.hero-glow {
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.7), transparent 70%);
  opacity: 0.8;
  filter: blur(2px);
}

/* Cards & grids */

.grid {
  display: grid;
  gap: 1.5rem;
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 2rem;
}

.portfolio-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 2rem;
}

.card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.85));
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover::before {
  opacity: 1;
}

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

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

/* Portfolio */

.card-portfolio .card-body {
  margin-top: 1rem;
}

.placeholder-thumb {
  height: 180px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.4), rgba(15, 23, 42, 1));
  border: 1px solid rgba(37, 99, 235, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Lists */

.list {
  padding-left: 1.1rem;
  color: var(--muted);
}

.list li + li {
  margin-top: 0.25rem;
}

/* Page hero */

.page-hero {
  padding: 3.5rem 0 2.5rem;
}

.page-title {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
}

.page-intro {
  max-width: 640px;
  color: var(--muted);
}

/* About */

.about-layout {
  display: grid;
  gap: 2rem;
}

.about-text p {
  color: var(--muted);
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
}

.contact-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: #020617;
  color: var(--text);
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 1px solid var(--accent-soft);
  border-color: var(--accent-soft);
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.contact-info p {
  color: var(--muted);
}

.contact-info a {
  color: var(--accent-soft);
  text-decoration: none;
}

/* Legal */

.legal-text p {
  color: var(--muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.8);
  padding: 2.5rem 0 2rem;
  background: radial-gradient(circle at bottom, #020617 0, #000 60%);
}

.footer-inner {
  text-align: center;
}

.footer-logo {
  margin-bottom: 0.25rem;
}

.footer-tagline {
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent-soft);
}

.footer-copy {
  color: #4b5563;
  font-size: 0.8rem;
}

/* 404 */

.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.not-found-inner {
  text-align: center;
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */

@media (max-width: 768px) {
  .hero-inner,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .nav {
    position: absolute;
    inset: 56px 1.5rem auto 1.5rem;
    background: #020617;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.9);
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .btn-small {
    padding-inline: 1rem;
  }
}
