:root {
  --primary: #3E4097;
  --primary-dark: #3F4071;
  --primary-darker: #141662;
  --primary-light: #7174CB;
  --primary-lighter: #898BCB;
  --bg-color: #fff;
  --text-color: #141662;
  --text-light: #3F4071;
  --nav-height: 60px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navigation with lighter background */

.main-nav {
  background: #fff;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(20, 22, 98, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: #3E4097;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(137, 139, 203, 0.2);
}


/* Main content */
main {
  min-height: calc(100vh - var(--nav-height) - 60px);
}

/* Home page hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero .subtitle {
  color: var(--primary-light);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--primary-darker);
  font-weight: 700;
}

.hero .lead {
  color: var(--text-light);
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.hero-image {
  margin-top: 3rem;
}

.hero-image img {
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(20, 22, 98, 0.15);
}

.hero-image .caption {
  color: var(--primary);
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.hero-image .subcaption {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* Default page content */
.page-content {
  padding: 3rem 0 5rem;
}

.page-content h1 {
  color: var(--primary);
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.page-content h2 {
  color: var(--primary-darker);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  font-size: 1.8rem;
}

.page-content h5 {
  color: var(--primary);
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
  font-weight: 600;
}

/* About page */
.about-header {
  position: relative;
  margin-bottom: 2rem;
}

.about-header img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.experience-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-top: 1rem;
}

/* Services page */
.page-content h5 {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-content h5::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--primary-lighter);
  border-radius: 8px;
  flex-shrink: 0;
}

/* Contact page */
.contact-header {
  margin-bottom: 2rem;
}

.contact-header img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
}

.contact-info {
  background: var(--primary-lighter);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.contact-info strong {
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--primary-darker);
  color: #fff;
  text-align: center;
  padding: 2rem;
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    gap: 0.5rem;
  }

  .nav-menu a {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero .lead {
    font-size: 1.1rem;
  }

  .page-content h1 {
    font-size: 2rem;
  }
}


/* Services grid with SVG icons */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-top: 3rem;
}

.service-item {
  text-align: center;
  padding: 2rem;
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
}

.service-icon path,
.service-icon circle,
.service-icon rect {
  stroke: #3E4097;
}

.service-item h3 {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.service-item p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

/* Responsive services grid */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-icon {
    width: 60px;
    height: 60px;
  }
}
/* Portfolio grid: responsive with auto-fill fallback */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.portfolio-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-image {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f5f5f5;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 1rem;
}

.card-content h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.3;
}

.card-subtitle {
  margin: 0;
  color: #666;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Tablet: two columns */
@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: three columns with auto-fill fallback */
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }

  .card-content h2 {
    font-size: 1.25rem;
  }
}
