/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --green: #34d399;
  --purple: #8b5cf6;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* ── Nav ─────────────────────────────────────────────────────── */
#site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent) !important;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 8px; }
.nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: rgba(88, 166, 255, 0.08); color: var(--text); }
.nav-link.active { background: rgba(88, 166, 255, 0.12); color: var(--accent); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
}
.hero-inner { max-width: 680px; margin: 0 auto; }
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-tagline {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; }

/* ── Highlights ──────────────────────────────────────────────── */
.highlights {
  padding: 0 24px 80px;
  max-width: 960px;
  margin: 0 auto;
}
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s;
}
.highlight-card:hover { border-color: var(--accent); }
.highlight-icon { font-size: 2rem; margin-bottom: 12px; }
.highlight-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--text);
}
.highlight-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Page sections (used by partials) ────────────────────────── */
.page-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}
.page-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.page-section p { margin-bottom: 16px; color: var(--text-muted); }
.page-section p strong { color: var(--text); }

/* Services list */
.service-list { list-style: none; margin: 24px 0; }
.service-list li {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.service-list li:hover { border-color: var(--accent); }
.service-list li strong { display: block; margin-bottom: 4px; color: var(--text); }
.service-list li span { font-size: 0.9rem; color: var(--text-muted); }

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.2s;
}
.portfolio-card:hover { border-color: var(--purple); }
.portfolio-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.portfolio-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
  margin-right: 4px;
  margin-bottom: 8px;
}
.portfolio-card p { font-size: 0.9rem; color: var(--text-muted); }

/* Contact */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.contact-card .contact-icon { font-size: 1.8rem; margin-bottom: 8px; }
.contact-card h3 { font-size: 1rem; margin-bottom: 4px; }

/* ── Contact Form ────────────────────────────────────────────── */
.contact-form {
  margin-top: 24px;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg); color: var(--text); }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── Footer ──────────────────────────────────────────────────── */
#site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
}
.footer-inner { max-width: 960px; margin: 0 auto; }
#site-footer p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.footer-contact a { color: var(--accent); }

/* ── HTMX transitions ───────────────────────────────────────── */
#content { opacity: 1; transition: opacity 0.15s ease; }
#content.htmx-swapping { opacity: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .nav-links { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 0.8rem; }
}
