:root {
  color-scheme: light dark;
  --bg: #0a0e14;
  --bg-elevated: #141b24;
  --bg-card: #1a2332;
  --text: #e7ecf1;
  --muted: #8b98a5;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 1rem;
  --max-width: 72rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

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

.logo:hover { color: var(--text); text-decoration: none; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  text-decoration: none;
}

/* Main content */
main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero .tagline {
  color: var(--muted);
  font-size: 1.25rem;
  margin-top: 1rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Portfolio section */
.section {
  padding: 3rem 0;
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--muted);
  margin-top: 0.5rem;
}

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

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.25);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .portfolio-card {
    grid-template-columns: 280px 1fr;
  }
}

.portfolio-card.featured {
  border-color: rgba(29, 155, 240, 0.3);
  box-shadow: 0 0 0 1px rgba(29, 155, 240, 0.1), 0 24px 48px rgba(0, 0, 0, 0.3);
}

.card-visual {
  background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 50%, #1d4a6e 100%);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card-visual .icon {
  font-size: 4rem;
  line-height: 1;
}

.card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.portfolio-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.portfolio-card p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-list li {
  font-size: 0.8125rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: var(--text);
}

.status-pill {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-elevated);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

/* About page */
.page-header {
  padding: 3rem 0 2rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.page-header p {
  color: var(--muted);
  font-size: 1.125rem;
  margin-top: 0.75rem;
  max-width: 40rem;
}

.prose {
  max-width: 42rem;
  padding-bottom: 3rem;
}

.prose h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--muted);
  margin-bottom: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose li { margin-bottom: 0.5rem; }

.prose strong { color: var(--text); font-weight: 600; }

.info-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

@media (min-width: 640px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0;
}

/* Legal pages */
.legal-content {
  max-width: 42rem;
  padding-bottom: 4rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.legal-content p,
.legal-content li {
  color: var(--muted);
  margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li { margin-bottom: 0.5rem; }

.legal-meta {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

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

.footer-links a:hover { color: var(--text); text-decoration: none; }

.footer-copy {
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-copy a { color: var(--muted); }
