:root {
  /* Color Palette - Precision Tech Vibe */
  --bg-base: #0a0a0a;
  --bg-surface: #121212;
  --bg-elevated: #1a1a1a;
  --bg-border: #27272a;
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  --accent-primary: #0ea5e9; /* Sky Blue */
  --accent-hover: #0284c7;
  --accent-secondary: #10b981; /* Emerald */
  
  --gradient-tracing: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));

  /* Spacing System */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-primary);
}

/* Typography Hierarchy */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { margin-bottom: var(--space-sm); color: var(--text-secondary); }

/* Layout Grid */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-cols-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-border);
  transition: transform var(--transition-normal);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

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

/* Footer */
.footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.1em;
}

.footer-brand p {
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-links h5 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

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

.footer-bottom {
  border-top: 1px solid var(--bg-border);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-base);
}

.btn-primary:hover {
  background-color: #e4e4e7;
  color: var(--bg-base);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--bg-border);
}

.btn-outline:hover {
  border-color: var(--text-primary);
  background-color: rgba(255,255,255,0.05);
}

/* Required Interaction: Gradient Border Tracing */
.callout-card {
  position: relative;
  background: var(--bg-surface);
  padding: var(--space-md);
  border-radius: 8px;
  z-index: 1;
  overflow: hidden;
}

.callout-card::before {
  content: "";
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: var(--gradient-tracing);
  z-index: -1;
  border-radius: 10px;
  opacity: 0;
  transition: opacity var(--transition-normal);
  background-size: 400% 400%;
  animation: gradientTrace 5s ease infinite;
}

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

.callout-card::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px; right: 1px; bottom: 1px;
  background: var(--bg-surface);
  z-index: -1;
  border-radius: 7px;
}

@keyframes gradientTrace {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Required Interaction: Subtle Elastic Tilt (handled mostly by JS, styling here) */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.1s ease-out; /* fast response for JS tracking */
}

.tilt-inner {
  transform: translateZ(20px); /* content pops out slightly during tilt */
}

/* Badge/Tag */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: 4px;
  color: var(--accent-primary);
  margin-bottom: var(--space-xs);
}
