/* ==========================
   Styles for Patryk Makowski
   Minimal, professional, accessible
   ========================== */

:root {
  --pm-nav-height: 72px;
  --pm-dark: #0d2818;
  --pm-forest: #1b4332;
  --pm-green-900: #0d2818;
  --pm-surface: #e6e3da;
  --pm-cream: #f7f5ef;
  --pm-accent: #b98e2f;
  --pm-muted: #6b6b6b;
  --pm-white: #ffffff;
}

/* Basic reset */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--pm-cream);
  color: var(--pm-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 2.25rem; margin: 0 0 0.5rem; letter-spacing: 0; }
h2 { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.5rem; margin: 0 0 1rem; }
h3 { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.125rem; margin: 0 0 0.5rem; }

/* Navigation */
.navbar {
  min-height: var(--pm-nav-height);
  background-color: rgba(13, 40, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--pm-cream);
}
.navbar .nav-link {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--pm-cream);
}
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active {
  color: var(--pm-accent);
}
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--pm-cream);
}
.navbar-collapse {
  background-color: rgba(13, 40, 24, 0.98);
}
.navbar-collapse .nav-item + .nav-item { margin-left: 0; }

/* Masthead */
.masthead {
  background: linear-gradient(180deg, var(--pm-forest) 0%, var(--pm-dark) 100%);
  color: var(--pm-white);
  padding: 6rem 0;
  min-height: 48vh;
  display: flex;
  align-items: center;
}
.masthead-mark {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--pm-white);
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
}
.masthead-heading { font-size: 2rem; margin-top: 0.5rem; }
.masthead-subheading { color: rgba(255, 255, 255, 0.88); margin-top: 0.5rem; }

/* Section headings */
.section-header {
  margin-bottom: 3rem;
  text-align: center;
}
.section-title {
  margin: 0;
  color: var(--pm-green-900);
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-transform: none;
}

.services-section {
  padding: 5rem 0;
}

#services,
#sectors,
#about,
#contact {
  scroll-margin-top: 100px;
}

/* Sector experience */
.sectors-section {
  padding: 4.5rem 0;
  background-color: var(--pm-white);
  border-top: 1px solid rgba(27, 67, 50, 0.08);
  border-bottom: 1px solid rgba(27, 67, 50, 0.08);
}

.sectors-intro {
  max-width: 680px;
  margin: -1.5rem auto 3rem;
  color: var(--pm-muted);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}

.sectors-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
}

.sector-item {
  min-width: 0;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  border-radius: 1rem;
  background-color: rgba(27, 67, 50, 0.03);
}

.sector-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  color: var(--pm-green-700);
  background-color: var(--pm-cream);
  border: 1px solid rgba(27, 67, 50, 0.16);
  border-radius: 50%;
  font-size: 1.55rem;
}

.sector-icon i {
  width: 1em;
  height: 1em;
}

.sector-label {
  color: var(--pm-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 991.98px) {
  .sectors-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem 1.5rem;
  }

  .about-layout {
    max-width: 760px;
  }

  .about-copy {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }

  .about-photo-wrapper {
    max-width: 230px;
  }
}

@media (max-width: 575.98px) {
  .sectors-section {
    padding: 4rem 0;
  }

  .sectors-intro {
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
  }

  .sectors-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 1rem;
  }

  .sector-icon {
    width: 62px;
    height: 62px;
    font-size: 1.4rem;
  }

  .sector-label {
    font-size: 0.85rem;
  }

  .about-section {
    padding: 2rem 0;
  }

  .about-layout {
    --bs-gutter-y: 2.5rem;
  }

  .about-photo-wrapper {
    max-width: 200px;
  }

  .about-photo {
    border-radius: 14px;
  }

  .about-copy p {
    font-size: 1.05rem;
    line-height: 1.75;
  }
}

/* Services cards */
.service-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background-color: var(--pm-white);
  color: inherit;
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}
.service-card .card-body { padding: 1.5rem; }
.service-icon { color: var(--pm-forest); }
.service-card h3 { color: var(--pm-dark); }
.service-card p { color: var(--pm-muted); }
.service-card:focus { box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.18); outline: none; }

.service-link {
  display: inline-flex;
  color: var(--pm-forest);
  font-weight: 600;
}
.service-link:hover,
.service-link:focus {
  color: var(--pm-accent);
}

/* Section styles */
.about-section {
  padding: 3rem 0 2.25rem;
  background-color: var(--pm-surface);
  color: var(--pm-dark);
}

.about-layout {
  max-width: 1040px;
  margin: 0 auto;
}

.about-copy {
  max-width: 620px;
}

.about-copy p {
  margin: 0 0 1.5rem;
  color: var(--pm-dark);
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: left;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-photo-wrapper {
  max-width: 270px;
  margin: 0 auto;
}

.about-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center center;
  border: 1px solid rgba(27, 67, 50, 0.14);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(13, 40, 24, 0.1);
}

.about-section p { color: var(--pm-dark); }
.contact-section {
  background-color: var(--pm-cream);
   padding: 2.75rem 0 3.5rem;
}

/* Buttons */
.btn-contact-primary {
  color: var(--pm-white) !important;
  background-color: var(--pm-forest) !important;
  border-color: transparent !important;
}
.btn-contact-primary:hover,
.btn-contact-primary:focus {
  background-color: var(--pm-dark) !important;
}
.btn-contact-secondary {
  color: var(--pm-dark) !important;
  background-color: transparent !important;
  border: 1px solid var(--pm-dark) !important;
}
.btn-contact-secondary:hover,
.btn-contact-secondary:focus {
  background-color: rgba(27, 67, 50, 0.08) !important;
}
.btn-primary {
  color: var(--pm-white) !important;
  background-color: var(--pm-forest) !important;
  border-color: var(--pm-forest) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--pm-dark) !important;
  border-color: var(--pm-dark) !important;
}
.btn-outline-primary {
  color: var(--pm-forest) !important;
  border-color: var(--pm-forest) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: var(--pm-white) !important;
  background-color: var(--pm-forest) !important;
  border-color: var(--pm-forest) !important;
}
.text-primary { color: var(--pm-forest) !important; }
.bg-primary { background-color: var(--pm-forest) !important; }
.text-secondary { color: var(--pm-muted) !important; }

/* Footer */
.site-footer {
  background-color: var(--pm-dark);
  color: var(--pm-white);
  padding: 2.5rem 0;
}
.site-footer a { color: var(--pm-cream); text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus { color: var(--pm-accent); }

/* Modal */
.portfolio-modal .portfolio-modal-title { color: var(--pm-dark); margin-bottom: 0.75rem; }
.modal-content {
  border-radius: 16px;
}
.modal-header { background-color: var(--pm-surface); }
.modal-body { color: var(--pm-dark); }
.btn-close { filter: brightness(0) invert(1); }

/* Focus styles for accessibility */
a:focus, button:focus { outline: 3px solid rgba(27, 67, 50, 0.18); outline-offset: 2px; }

/* Small screens adjustments */
@media (max-width: 767px) {
  .masthead { padding: 4rem 0; }
  h1 { font-size: 1.5rem; }
  .masthead-mark { width: 72px; height: 72px; font-size: 1.125rem; }
  .service-card .card-body { padding: 1rem; }
  .navbar-collapse { padding: 1rem; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .masthead-heading { font-size: 1.75rem; }
}

/* Utility */
.service-icon { display: flex; align-items: center; justify-content: center; height: 44px; }
.card { box-shadow: none; }

/* Final responsive About and Contact spacing */
@media (max-width: 991.98px) {
  .about-photo-wrapper {
    max-width: 230px;
  }
}

@media (max-width: 575.98px) {
  .about-section {
    padding: 2.5rem 0 2rem;
  }

  .about-layout {
    --bs-gutter-y: 2rem;
  }

  .about-photo-wrapper {
    max-width: 200px;
  }

  .contact-section {
    padding: 2.5rem 0 3rem;
  }
}

