/**
 * Adam Mortimer - Contractor Services Page
 * Full Stylesheet with Theme System
 * 
 * Structure:
 * 1. CSS Custom Properties (Themes)
 * 2. Base/Reset Styles
 * 3. Layout Components
 * 4. UI Components
 * 5. Section-Specific Styles
 * 6. Utility Classes
 * 7. Print Styles
 */

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES / THEMES
   ========================================================================== */

/* Warm Light Theme (Default) */
:root,
[data-theme="warm-light"] {
  /* Backgrounds */
  --bg-primary: #faf8f5;
  --bg-surface: #f2efe9;
  --bg-surface-elevated: #ffffff;
  
  /* Text */
  --text-primary: #2d2a26;
  --text-secondary: #5c5752;
  --text-tertiary: #8a857d;
  
  /* Borders */
  --border: #e0dcd4;
  --border-hover: #c9c4ba;
  
  /* Accent - Muted Copper (actions + outcomes only) */
  --accent: #b87333;
  --accent-hover: #9a5f28;
  --accent-subtle: rgba(184, 115, 51, 0.1);
  --accent-text: #ffffff;
  
  /* Issue/Fix colors */
  --issue-color: #a85454;
  --issue-subtle: rgba(168, 84, 84, 0.08);
  --fix-color: #9a8a2e;
  --fix-subtle: rgba(154, 138, 46, 0.08);
  
  /* Effects */
  --noise-opacity: 0.02;
  --schematic-opacity: 0;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --base-font-size: 16px;
  --line-height: 1.6;
  
  /* Interactive */
  --focus-ring: 0 0 0 2px var(--accent);
  --focus-ring-offset: 0 0 0 4px var(--bg-primary);
  
  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-medium: 250ms ease-out;
}

/* Cool Dark Theme */
[data-theme="cool-dark"] {
  /* Backgrounds */
  --bg-primary: #0f1419;
  --bg-surface: #1a2028;
  --bg-surface-elevated: #232b35;
  
  /* Text */
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-tertiary: #6b7280;
  
  /* Borders */
  --border: #2d3640;
  --border-hover: #3d4a57;
  
  /* Accent - Muted Teal (actions + outcomes only) */
  --accent: #4db6ac;
  --accent-hover: #5fcec3;
  --accent-subtle: rgba(77, 182, 172, 0.12);
  --accent-text: #0f1419;
  
  /* Issue/Fix colors */
  --issue-color: #cf6b6b;
  --issue-subtle: rgba(207, 107, 107, 0.12);
  --fix-color: #d4b84a;
  --fix-subtle: rgba(212, 184, 74, 0.1);
  
  /* Effects */
  --noise-opacity: 0.03;
  --schematic-opacity: 0.03;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* High Contrast Theme (WCAG AAA) */
[data-theme="high-contrast"] {
  /* Backgrounds */
  --bg-primary: #000000;
  --bg-surface: #1a1a1a;
  --bg-surface-elevated: #2a2a2a;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-tertiary: #b0b0b0;
  
  /* Borders - Thicker for visibility */
  --border: #666666;
  --border-hover: #999999;
  
  /* Accent - High visibility cyan */
  --accent: #00ffff;
  --accent-hover: #66ffff;
  --accent-subtle: rgba(0, 255, 255, 0.15);
  --accent-text: #000000;
  
  /* Issue/Fix colors - High visibility */
  --issue-color: #ff6b6b;
  --issue-subtle: rgba(255, 107, 107, 0.15);
  --fix-color: #ffd93d;
  --fix-subtle: rgba(255, 217, 61, 0.12);
  
  /* Effects - Disabled */
  --noise-opacity: 0;
  --schematic-opacity: 0;
  --card-shadow: none;
  --card-shadow-hover: none;
  
  /* Typography - Larger for accessibility */
  --base-font-size: 18px;
  --line-height: 1.7;
  
  /* Interactive - More prominent focus */
  --focus-ring: 0 0 0 3px var(--accent);
}

/* High Contrast border adjustment for cards */
[data-theme="high-contrast"] .project-card,
[data-theme="high-contrast"] .service-card,
[data-theme="high-contrast"] .metric-tile {
  border-width: 2px;
}

/* Respect prefers-contrast */
@media (prefers-contrast: more) {
  :root {
    --bg-primary: #000000;
    --bg-surface: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --border: #666666;
    --accent: #00ffff;
    --noise-opacity: 0;
    --base-font-size: 18px;
    --line-height: 1.7;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   2. BASE / RESET STYLES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul,
ol {
  list-style: none;
}

/* ==========================================================================
   3. NOISE TEXTURE OVERLAY
   ========================================================================== */

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Disable noise for high contrast and reduced motion */
[data-theme="high-contrast"] .noise-overlay,
@media (prefers-contrast: more) {
  .noise-overlay {
    display: none;
  }
}

/* ==========================================================================
   4. SCHEMATIC BACKGROUND (Cool Dark only)
   ========================================================================== */

[data-theme="cool-dark"] .competencies::before,
[data-theme="cool-dark"] .services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: var(--schematic-opacity);
  pointer-events: none;
  background-image: 
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.competencies,
.services {
  position: relative;
}

/* ==========================================================================
   5. LAYOUT COMPONENTS
   ========================================================================== */

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 10000;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }
}

/* ==========================================================================
   6. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-surface);
  padding: 0.125em 0.375em;
  border-radius: 3px;
  color: var(--text-secondary);
}

/* ==========================================================================
   7. LINKS & BUTTONS
   ========================================================================== */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

/* ==========================================================================
   8. THEME TOGGLE
   ========================================================================== */

.theme-toggle-wrapper {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.theme-toggle__icon svg {
  display: none;
}

[data-theme="warm-light"] .theme-toggle .icon-light {
  display: block;
}

[data-theme="cool-dark"] .theme-toggle .icon-dark {
  display: block;
}

[data-theme="high-contrast"] .theme-toggle .icon-contrast {
  display: block;
}

.theme-toggle__label {
  display: none;
}

@media (min-width: 640px) {
  .theme-toggle__label {
    display: inline;
  }
}

/* ==========================================================================
   9. HERO SECTION
   ========================================================================== */

.hero {
  padding: 5rem 0 3rem;
  position: relative;
}

@media (min-width: 768px) {
  .hero {
    padding: 7rem 0 4rem;
  }
}

.hero__title {
  margin-bottom: 0.25rem;
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.hero__subtitle {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero__summary {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  max-width: 48ch;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.hero__detail {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 65ch;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   10. METRICS STRIP
   ========================================================================== */

.metrics {
  padding: 2.5rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metrics__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .metrics__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.metric-tile {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all var(--transition-fast);
  position: relative;
  isolation: isolate;
}

.metric-tile:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.metric-tile__value {
  display: block;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.375rem;
  color: var(--text-primary);
}

.metric-tile__label {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.3;
}

.metric-tile__event {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  position: relative;
  z-index: 2;
  text-align: center;
}

/* Event tiles with images */
.metric-tile--event {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem;
}

@media (min-width: 768px) {
  .metric-tile--event {
    aspect-ratio: 4 / 3;
    min-height: 160px;
  }
}

.metric-tile__img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(30%);
  transition: opacity var(--transition-fast), filter var(--transition-fast);
}

.metric-tile--event:hover .metric-tile__img {
  opacity: 0.45;
  filter: grayscale(15%);
}

[data-theme="cool-dark"] .metric-tile__img {
  opacity: 0.30;
  filter: grayscale(40%);
}

[data-theme="cool-dark"] .metric-tile--event:hover .metric-tile__img {
  opacity: 0.40;
  filter: grayscale(25%);
}

[data-theme="high-contrast"] .metric-tile__img {
  opacity: 0.15;
  filter: grayscale(100%);
}

/* Plus icon tile */
.metric-tile--muted {
  background: var(--bg-surface-elevated);
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 140px;
  aspect-ratio: 1 / 1;
  padding: 1rem;
}

@media (min-width: 768px) {
  .metric-tile--muted {
    aspect-ratio: 4 / 3;
    min-height: 160px;
  }
}

.metric-tile__plus-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  color: var(--text-tertiary);
}

.metric-tile--muted .metric-tile__event {
  color: var(--text-secondary);
  font-weight: 500;
  text-align: center;
}

/* ==========================================================================
   11. COMPETENCIES SECTION
   ========================================================================== */

.competencies {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .competencies {
    padding: 5rem 0;
  }
}

.competencies__groups {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .competencies__groups {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.competency-group__title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.chip:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-elevated);
}

.chip code {
  background: transparent;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   12. PROJECTS SECTION
   ========================================================================== */

.projects {
  padding: 4rem 0;
  background: var(--bg-surface);
}

@media (min-width: 768px) {
  .projects {
    padding: 5rem 0;
  }
}

.projects__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .projects__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.project-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--card-shadow);
  position: relative;
  isolation: isolate;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.project-card__header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.project-card__title {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.project-card__meta {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 0;
}

.project-card__content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-card__section {
  margin-bottom: 1.25rem;
}

.project-card__section:last-child {
  margin-bottom: 0;
}

.project-card__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.375rem;
}

.project-card__section p {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

/* Issue highlight - subtle red */
.project-card__section--issue {
  padding: 1rem;
  background: var(--issue-subtle, rgba(180, 60, 60, 0.08));
  border-radius: 8px;
  border-left: 3px solid var(--issue-color, #b85c5c);
}

.project-card__label--issue {
  color: var(--issue-color, #b85c5c);
}

/* Fix highlight - subtle amber */
.project-card__section--fix {
  padding: 1rem;
  background: var(--fix-subtle, rgba(180, 140, 60, 0.08));
  border-radius: 8px;
  border-left: 3px solid var(--fix-color, #b8a033);
}

.project-card__label--fix {
  color: var(--fix-color, #b8a033);
}

/* Result highlight - uses accent color */
.project-card__section--result {
  padding: 1rem;
  background: var(--accent-subtle);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.project-card__label--result {
  color: var(--accent);
}

.project-card__result {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   13. SERVICES SECTION
   ========================================================================== */

.services {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .services {
    padding: 5rem 0;
  }
}

.services__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.service-card {
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all var(--transition-fast);
  position: relative;
  isolation: isolate;
  text-align: center;
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}

.service-card__icon svg {
  width: 36px;
  height: 36px;
}

.service-card__title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  text-align: center;
}

.service-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
}

.service-card__list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 5px;
  height: 5px;
  background: var(--border-hover);
  border-radius: 50%;
}

/* ==========================================================================
   14. LOGISTICS SECTION
   ========================================================================== */

.logistics {
  padding: 4rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .logistics {
    padding: 5rem 0;
  }
}

.logistics__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .logistics__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .logistics__grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .logistics__grid--5 {
    grid-template-columns: repeat(5, 1fr);
  }
}

.logistics__item {
  padding: 1.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  isolation: isolate;
  text-align: center;
}

.logistics__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.logistics__value {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.logistics__note {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.logistics__value--highlight {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-weight: 500;
  color: var(--accent);
}

.logistics__list {
  margin-top: 0.5rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.logistics__list li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding-left: 1rem;
  position: relative;
}

.logistics__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-tertiary);
}

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .footer {
    padding: 5rem 0 2rem;
  }
}

.footer__cta {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.footer__cta h2 {
  margin-bottom: 0.75rem;
}

.footer__cta p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.footer__actions {
  display: flex;
  justify-content: center;
}

.footer__contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.footer__contact-item {
  text-align: center;
}

.footer__contact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
}

.footer__contact-item a {
  font-size: 1rem;
  font-weight: 500;
}

.footer__copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   16. MODAL
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal:not([hidden]) {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="high-contrast"] .modal__backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: none;
}

.modal__content {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalIn 200ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .modal__content {
    animation: none;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.modal__close:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.modal__title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.modal__description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal__contact-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.modal__contact-link:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.modal__contact-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.modal__contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--accent-subtle);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}

.modal__contact-text {
  display: flex;
  flex-direction: column;
}

.modal__contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.modal__contact-value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.modal__emergency-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--accent-subtle);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.modal__emergency-note[hidden] {
  display: none;
}

.modal__emergency-note strong {
  color: var(--accent);
}

/* ==========================================================================
   17. UTILITY CLASSES
   ========================================================================== */

.text-accent {
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   18. PRINT STYLES
   ========================================================================== */

@media print {
  /* Reset colors and backgrounds */
  :root {
    --bg-primary: #ffffff;
    --bg-surface: #f8f8f8;
    --bg-surface-elevated: #ffffff;
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-tertiary: #666666;
    --border: #cccccc;
    --accent: #000000;
    --noise-opacity: 0;
    --card-shadow: none;
    --card-shadow-hover: none;
  }
  
  /* Hide non-essential elements */
  .noise-overlay,
  .theme-toggle-wrapper,
  .skip-link,
  .modal,
  .btn,
  .hero__actions,
  .footer__actions {
    display: none !important;
  }
  
  /* Improve print layout */
  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .hero,
  .metrics,
  .competencies,
  .projects,
  .services,
  .logistics,
  .footer {
    padding: 1rem 0;
    break-inside: avoid;
  }
  
  .hero {
    padding-top: 0;
  }
  
  h1 {
    font-size: 24pt;
  }
  
  h2 {
    font-size: 14pt;
    margin-bottom: 0.75rem;
  }
  
  h3 {
    font-size: 12pt;
  }
  
  /* Simplify grids for print */
  .metrics__grid,
  .competencies__groups,
  .projects__grid,
  .services__grid,
  .logistics__grid {
    display: block;
  }
  
  .metric-tile,
  .competency-group,
  .project-card,
  .service-card,
  .logistics__item {
    margin-bottom: 0.75rem;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  
  /* Remove hover effects */
  .metric-tile:hover,
  .project-card:hover,
  .service-card:hover {
    transform: none;
    box-shadow: none;
  }
  
  /* Chips inline */
  .chip-list {
    display: inline;
  }
  
  .chip {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin-right: 0.5rem;
  }
  
  .chip::after {
    content: ',';
  }
  
  .chip:last-child::after {
    content: '';
  }
  
  /* Print URLs for links */
  .footer__contact-item a[href^="tel:"]::after,
  .footer__contact-item a[href^="mailto:"]::after {
    content: none;
  }
  
  a[href^="http"]:not([href*="mortimer.fyi"])::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  /* Issue/Fix/Result highlights - simpler for print */
  .project-card__section--issue,
  .project-card__section--fix,
  .project-card__section--result {
    background: #f5f5f5;
    border-left: 3px solid #666;
  }
  
  .project-card__section--result {
    border-left-color: #000;
  }
  
  .project-card__label--issue,
  .project-card__label--fix,
  .project-card__label--result {
    color: #000;
  }
}

