/*
 * Perpetual TechSolutions - Modern Design System
 * Professional redesign using logo brand colors
 * Mobile-first responsive design
 */

/* ============================================
   CSS VARIABLES - DESIGN TOKENS
   ============================================ */

:root {
  /* Brand Colors - From Logo */
  --brand-navy: #1B2D4F;
  --brand-gold: #F4C542;
  --brand-red: #B8342B;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  --black: #000000;
  
  /* Semantic Colors */
  --success: #28A745;
  --warning: #FFC107;
  --danger: #DC3545;
  --info: #17A2B8;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1B2D4F 0%, #2C4A7C 100%);
  --gradient-gold: linear-gradient(135deg, #F4C542 0%, #F5D066 100%);
  --gradient-light: linear-gradient(180deg, #F8F9FA 0%, #FFFFFF 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(27,45,79,0.8) 0%, rgba(27,45,79,0.4) 100%);
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: var(--font-primary);
  
  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 6rem;     /* 96px */
  --space-16: 8rem;     /* 128px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--gray-900);
  background-color: var(--white);
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--brand-navy);
  margin-bottom: var(--space-4);
}

h1 { font-size: 1.75rem; }  /* Mobile: 28px */
h2 { font-size: 1.5rem; }   /* Mobile: 24px */
h3 { font-size: 1.25rem; }  /* Mobile: 20px */
h4 { font-size: 1.125rem; } /* Mobile: 18px */
h5 { font-size: 1rem; }     /* Mobile: 16px */
h6 { font-size: 0.875rem; } /* Mobile: 14px */

/* Tablet+ Typography */
@media (min-width: 768px) {
  h1 { font-size: 2.625rem; }  /* 42px */
  h2 { font-size: 2rem; }      /* 32px */
  h3 { font-size: 1.5rem; }    /* 24px */
}

/* Desktop Typography */
@media (min-width: 1200px) {
  h1 { font-size: 3.75rem; }   /* 60px */
  h2 { font-size: 2.625rem; }  /* 42px */
  h3 { font-size: 1.875rem; }  /* 30px */
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--brand-navy);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--brand-gold);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.section {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header-wrap {
  background-color: var(--white);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: 0 2px 4px rgba(0,0,0,0);
  transition: all var(--transition-base);
}

.header-wrap.sticky {
  box-shadow: var(--shadow-md);
  padding: var(--space-3) 0;
}

.header-wrap .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-wrap .logo img {
  height: 60px;
  width: auto;
  transition: height var(--transition-base);
}

/* Mobile logo size */
@media (max-width: 767px) {
  .header-wrap .logo img {
    height: 45px;
  }
  
  .header-wrap.sticky .logo img {
    height: 40px;
  }
}

.header-wrap.sticky .logo img {
  height: 50px;
}

.header-wrap nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
}

.header-wrap nav a {
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  color: var(--brand-navy);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.header-wrap nav a:hover {
  background-color: var(--gray-50);
  color: var(--brand-gold);
}

/* Mobile Menu Toggle */
.m-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: var(--space-2);
}

.m-toggle .bar1,
.m-toggle .bar2,
.m-toggle .bar3 {
  width: 25px;
  height: 3px;
  background-color: var(--brand-navy);
  transition: all var(--transition-base);
  border-radius: 2px;
}

@media (max-width: 767px) {
  /* Hide Contact Us button on mobile to prevent overlap */
  .header-wrap .btn-primary.btn-small {
    display: none;
  }
  
  .header-wrap .container {
    gap: var(--space-3);
  }
  
  .m-toggle {
    display: flex;
    order: 3; /* Ensure hamburger is last */
  }
  
  .header-wrap .logo {
    order: 1;
  }
  
  .header-wrap nav {
    display: none;
    opacity: 0;
    order: 2;
  }
  
  .header-wrap nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    padding: var(--space-4);
    animation: slideDown 0.3s ease-out forwards;
    opacity: 1;
    z-index: var(--z-dropdown);
  }
  
  .header-wrap nav.active ul {
    flex-direction: column;
    gap: 0;
  }
  
  .header-wrap nav.active li {
    width: 100%;
    border-bottom: 1px solid var(--gray-200);
  }
  
  .header-wrap nav.active li:last-child {
    border-bottom: none;
  }
  
  .header-wrap nav.active a {
    display: block;
    padding: var(--space-4);
  }
  
  /* Hamburger animation when active */
  .m-toggle.active .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .m-toggle.active .bar2 {
    opacity: 0;
  }
  
  .m-toggle.active .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Mobile menu backdrop */
  .mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 45, 79, 0.5);
    z-index: calc(var(--z-dropdown) - 1);
    animation: fadeIn 0.3s ease-out;
    backdrop-filter: blur(4px);
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  min-height: 48px; /* Touch-friendly */
}

.btn-primary {
  background-color: var(--brand-gold);
  color: var(--brand-navy);
  box-shadow: 0 4px 12px rgba(244, 197, 66, 0.3);
}

.btn-primary:hover {
  background-color: #E5B839;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 197, 66, 0.4);
  color: var(--brand-navy);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--brand-navy);
}

.btn-outline {
  background-color: transparent;
  color: var(--brand-navy);
  border-color: var(--brand-navy);
}

.btn-outline:hover {
  background-color: var(--brand-navy);
  color: var(--white);
}

.btn-large {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-lg);
}

.btn-small {
  padding: 0.625rem 1.5rem;
  font-size: var(--text-sm);
  min-height: 40px;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 450px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-10) 0;
  color: var(--white);
  overflow: hidden;
}

/* Particle Network Canvas */
.hero-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none; /* Allow clicks through to content */
}

.hero .container {
  position: relative;
  z-index: 2; /* Above canvas */
}

/* Mobile hero adjustments */
@media (max-width: 767px) {
  .hero {
    min-height: 500px;
    padding: var(--space-8) 0;
  }
  
  .hero__title {
    font-size: 1.75rem !important; /* 28px - prevent cutoff */
    line-height: 1.3 !important;
    margin-bottom: var(--space-4) !important;
  }
  
  .hero__subtitle {
    font-size: 0.95rem !important; /* 15px */
    line-height: 1.6 !important;
    margin-bottom: var(--space-5) !important;
  }
  
  .hero__cta {
    flex-direction: column !important;
    gap: var(--space-3) !important;
    align-items: center !important;
    padding: 0 30px !important; /* More side padding */
  }
  
  .hero__cta .btn {
    width: auto !important; /* Not full width */
    max-width: 280px !important; /* Limit max width */
    min-width: 240px !important; /* Minimum comfortable width */
    justify-content: center;
    font-size: 0.9375rem !important; /* 15px */
    font-weight: 600 !important;
    padding: 0.875rem 2rem !important; /* 14px 32px - more horizontal padding */
    min-height: 50px !important;
    border-radius: 25px !important; /* Slightly less rounded */
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem !important; /* 14px */
  }
  
  .hero__cta .btn-primary {
    box-shadow: 0 4px 16px rgba(244, 197, 66, 0.35) !important;
  }
  
  .hero__cta .btn-secondary {
    border-width: 2px !important;
    background-color: transparent !important;
  }
}

@media (min-width: 768px) {
  .hero {
    min-height: 500px;
  }
}

@media (min-width: 1200px) {
  .hero {
    min-height: 600px;
    padding: var(--space-16) 0;
  }
}

.hero__content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  color: var(--white);
  margin-bottom: var(--space-5);
  font-size: 1.75rem;
  line-height: var(--leading-tight);
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 2.625rem;
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: 3.75rem;
  }
}

.text-accent {
  color: var(--brand-gold);
  display: inline-block;
}

.hero__subtitle {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero__subtitle {
    font-size: var(--text-lg);
  }
}

@media (min-width: 1200px) {
  .hero__subtitle {
    font-size: var(--text-xl);
  }
}

.hero__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
}

@media (min-width: 1200px) {
  .section-title {
    font-size: var(--text-4xl);
  }
}

.section-subtitle {
  font-size: var(--text-base);
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .section-subtitle {
    font-size: var(--text-lg);
  }
}

.section-title-underline {
  width: 60px;
  height: 4px;
  background: var(--gradient-gold);
  margin: var(--space-4) auto;
  border-radius: var(--radius-full);
}

/* ============================================
   CARDS & COMPONENTS
   ============================================ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: var(--gray-100);
}

@media (min-width: 1200px) {
  .card__image {
    height: 220px;
  }
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card__image img {
  transform: scale(1.05);
}

.card__image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(27, 45, 79, 0.2) 100%);
}

.card__content {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1200px) {
  .card__content {
    padding: var(--space-6);
  }
}

.card__title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--brand-navy);
  margin-bottom: var(--space-3);
}

.card__description {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  flex: 1;
  margin-bottom: var(--space-5);
}

.card__link {
  color: var(--brand-gold);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--transition-base);
}

.card__link:hover {
  gap: var(--space-3);
}

.card__link::after {
  content: '→';
  font-size: var(--text-lg);
}

/* ============================================
   FOOTER
   ============================================ */

.footer-wrap {
  background-color: var(--brand-navy);
  color: var(--white);
  padding: var(--space-10) 0 var(--space-6);
}

.footer-social {
  text-align: center;
  margin-bottom: var(--space-8);
}

.footer-social h5 {
  color: var(--white);
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

.social-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.social-links li {
  margin: 0;
}

.social-links a {
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.social-links a:hover {
  background-color: var(--brand-gold);
  transform: translateY(-4px);
}

.social-links img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.social-links a:hover img {
  filter: none;
}

.copy-block {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-5);
  text-align: center;
}

.copy-block p {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  margin: 0;
}

/* ============================================
   SOFTWARE GRID SECTION
   ============================================ */

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.software-item {
  text-align: center;
  padding: 1.5rem;
  transition: transform var(--transition-base);
}

.software-item:hover {
  transform: translateY(-4px);
}

.software-item img {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
  display: inline-block;
}

.software-item h4 {
  font-size: 1.125rem;
  color: var(--brand-navy);
  margin-bottom: 0.5rem;
  font-weight: var(--font-semibold);
}

.software-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* ============================================
   PROJECTS GRID SECTION
   ============================================ */

.projects-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3rem;
  margin-top: 3rem;
  width: 100%;
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Tablet+: Side by side */
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 45% 55% !important;
    align-items: start;
    column-gap: 4rem;
  }
}

/* Desktop: Better proportions */
@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: 40% 60% !important;
    column-gap: 5rem;
  }
}

/* ============================================
   PROJECT CAROUSEL
   ============================================ */

.project-images-carousel {
  position: relative;
  width: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 500px;
}

@media (max-width: 767px) {
  .carousel-slides {
    height: 350px;
  }
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide .project-image-wrapper {
  width: 100%;
  height: 100%;
}

.carousel-slide .project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(27, 45, 79, 0.8);
  border: none;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 20;
  backdrop-filter: blur(4px);
}

.carousel-arrow:hover {
  background: var(--brand-gold);
  color: var(--brand-navy);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 16px;
}

.carousel-next {
  right: 16px;
}

/* Hide arrows on mobile, rely on auto-play and dots */
@media (max-width: 767px) {
  .carousel-arrow {
    width: 40px;
    height: 40px;
  }
}

/* Indicator Dots */
.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 20;
}

.carousel-indicators .indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  padding: 0;
}

.carousel-indicators .indicator:hover {
  background: var(--white);
  transform: scale(1.2);
}

.carousel-indicators .indicator.active {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  width: 32px;
  border-radius: 6px;
}

/* Old stacked images layout - keep as fallback */
.project-images {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-image-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(27, 45, 79, 0.12);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  background: var(--white);
  border: 3px solid var(--gray-100);
  position: relative;
}

.project-image-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(27, 45, 79, 0.18);
  border-color: var(--brand-gold);
}

.project-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border: none !important;
  outline: none !important;
}

/* Image labels */
.project-image-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--brand-navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.project-image-wrapper:hover .project-image-label {
  background: var(--brand-gold);
  color: var(--brand-navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.project-content h3 {
  font-size: 1.5rem;
  color: var(--brand-navy);
  margin-bottom: 1.5rem;
  font-weight: var(--font-bold);
}

@media (min-width: 768px) {
  .project-content h3 {
    font-size: 1.875rem;
  }
}

.project-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.project-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--gray-700);
  font-size: 1rem;
  line-height: var(--leading-relaxed);
}

@media (min-width: 768px) {
  .project-list li {
    font-size: 1.125rem;
  }
}

.project-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-gold);
  font-weight: var(--font-bold);
  font-size: 1.5rem;
  line-height: 1;
  top: 0.75rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.bg-white { background-color: var(--white); }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-navy { background-color: var(--brand-navy); }
.bg-gradient-light { background: var(--gradient-light); }

.text-navy { color: var(--brand-navy); }
.text-gold { color: var(--brand-gold); }
.text-white { color: var(--white); }
.text-gray-600 { color: var(--gray-600); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none !important; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Improved focus states with softer glow */
*:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(244, 197, 66, 0.2);
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand-navy);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  z-index: var(--z-tooltip);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
}

/* ============================================
   LEGACY CSS OVERRIDES
   ============================================ */

/* Override legacy layout.css conflicts */
.projects-grid img,
.project-image-wrapper img,
.software-item img,
.card__image img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Ensure clean project section */
.projects-grid * {
  box-sizing: border-box;
}

/* Reset legacy body colors */
body h3,
body h4,
body {
  color: inherit;
}

.project-content h3 {
  color: var(--brand-navy) !important;
}

.project-list li {
  color: var(--gray-700) !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .header-wrap,
  .footer-wrap,
  .btn {
    display: none;
  }
}
