/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-bg: #050712; /* deep, technical background */
  --color-surface: #0d1117;
  --color-surface-alt: #111827;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2933;

  --color-primary: #1d4ed8; /* professional blue */
  --color-primary-soft: rgba(37, 99, 235, 0.12);
  --color-primary-strong: #1e40af;

  --color-success: #16a34a;
  --color-warning: #facc15;
  --color-danger: #dc2626;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px */
  --font-size-2xl: 1.5rem;  /* 24px */
  --font-size-3xl: 1.875rem;/* 30px */
  --font-size-4xl: 2.25rem; /* 36px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.4);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.55);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.7);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

/* ==========================================================================
   Reset / Normalize
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: #f9fafb;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  margin-bottom: var(--space-2);
}

h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* ==========================================================================
   Accessibility & Motion
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1120px; /* comfortable corporate layout */
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-6);
  }
}

.section {
  padding-block: var(--space-12);
}

.section--hero {
  padding-block: var(--space-16);
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-6);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Spacing utilities (commonly used) */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.py-6 { padding-block: var(--space-6); }
.py-8 { padding-block: var(--space-8); }
.py-12 { padding-block: var(--space-12); }

.text-center { text-align: center; }
.text-right { text-align: right; }

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
}

/* Screen reader only */
.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #f9fafb;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1d4ed8);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
  color: #f9fafb;
}

.btn-secondary {
  background-color: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: #111827;
  border-color: #374151;
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border-color: rgba(37, 99, 235, 0.4);
}

.btn-ghost:hover {
  background-color: rgba(37, 99, 235, 0.08);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Inputs & Forms */
.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid #1f2933;
  background-color: #020617;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

.form-control::placeholder {
  color: var(--gray-500);
}

.form-control:focus-visible {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #1d4ed8;
}

.form-control[readonly] {
  background-color: #020617;
  opacity: 0.9;
}

.form-control:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: var(--font-size-sm);
  color: var(--gray-200);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-hint {
  margin-top: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-error {
  margin-top: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card */
.card {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.card--muted {
  background: var(--color-surface-alt);
}

.card-header {
  margin-bottom: var(--space-3);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text);
}

/* Info block for contact / company data */
.info-block {
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
  padding: var(--space-4);
  font-size: var(--font-size-sm);
}

.info-block dt {
  font-weight: 500;
  color: var(--gray-200);
}

.info-block dd {
  margin: 0 0 var(--space-2);
  color: var(--color-text);
}

/* Tagline / small accent text */
.tagline {
  font-size: var(--font-size-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hero layout helpers */
.hero-title {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 40rem;
}

/* Simple chip list for technologies / services */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: var(--font-size-xs);
  color: var(--gray-200);
  background-color: rgba(15, 23, 42, 0.9);
}
