:root {
  --bg: #0a0d14;
  --bg-alt: #0e1220;
  --surface: #131826;
  --surface-2: #1a2033;
  --border: rgba(255, 255, 255, 0.08);
  --text: #eef1f7;
  --text-muted: #8993ab;
  --accent: #5b8cff;
  --accent-2: #8b6bff;
  --accent-mint: #37d399;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.display-font {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

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

a {
  text-decoration: none;
}

.text-muted-2 {
  color: var(--text-muted) !important;
}

.bg-noise {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(91, 140, 255, 0.14), transparent 40%),
    radial-gradient(circle at 85% 0%, rgba(139, 107, 255, 0.12), transparent 45%);
}

/* Navbar */
.navbar {
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.navbar.scrolled {
  background: rgba(10, 13, 20, 0.92);
  border-bottom-color: var(--border);
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--text) !important;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(91, 140, 255, 0.55);
}

.btn-accent:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-outline-soft {
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}

.btn-outline-soft:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent-mint);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent-mint);
  display: inline-block;
}

/* Hero */
.hero {
  padding: 9rem 0 6rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
}

.hero .lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 520px;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.terminal__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__body {
  padding: 1.25rem 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.9;
  color: #c7cee0;
}

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

.terminal__body .ok {
  color: var(--accent-mint);
}

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

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

/* Sections */
section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
}

/* Services */
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 140, 255, 0.35);
}

.service-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 140, 255, 0.12);
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Project browser-frame cards */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(139, 107, 255, 0.4);
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.75rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.browser-frame__dots {
  display: flex;
  gap: 6px;
}

.browser-frame__dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.browser-frame__url {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  cursor: pointer;
  background: var(--surface-2);
}

.project-preview-btn {
  border: 0;
  padding: 0;
  background: none;
  display: block;
  width: 100%;
}

.project-preview-btn:focus-visible .project-preview {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.project-body {
  padding: 1.35rem;
}

.tag-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--accent-mint);
  background: rgba(55, 211, 153, 0.1);
  border: 1px solid rgba(55, 211, 153, 0.25);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0;
}

.project-link {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.project-link i {
  transition: transform 0.15s ease;
}

.project-link:hover {
  color: var(--accent);
}

.project-link:hover i {
  transform: translate(2px, -2px);
}

/* Contact CTA */
.contact-panel {
  background: linear-gradient(135deg, rgba(91, 140, 255, 0.12), rgba(139, 107, 255, 0.12));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.contact-item i {
  color: var(--accent);
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.social-link:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* Modal theming */
.modal-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.modal-header,
.modal-footer {
  border-color: var(--border);
}

.btn-close {
  filter: invert(1) grayscale(1) brightness(1.7);
}

.form-control,
.form-select {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.form-control:focus,
.form-select:focus {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(91, 140, 255, 0.2);
}

.form-control::placeholder {
  color: #5b6478;
}

.form-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.form-label .bi {
  margin-right: 0.35rem;
  color: var(--accent);
  opacity: 0.85;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .terminal__cursor {
    animation: none;
  }
}
