:root {
  color-scheme: light;
  --ink: #111b16;
  --body: #4d5a53;
  --muted: #7a867f;
  --line: #e1e8e2;
  --green: #08743f;
  --green-dark: #034a2a;
  --green-soft: #edf7f1;
  --purple: #65507c;
  --red: #d21f2f;
  --gold: #b89a52;
  --surface: #f4f8f5;
  --panel: #ffffff;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }

  html,
  body {
    background:
      linear-gradient(120deg, rgba(3, 74, 42, 0.06), transparent 32rem),
      linear-gradient(180deg, #f7faf8 0%, #edf6f1 100%);
    color: var(--ink);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(3, 74, 42, 0.06), transparent 32rem),
    linear-gradient(180deg, #f7faf8 0%, #edf6f1 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.directory-shell {
  width: min(100%, 1040px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px 36px;
}

.directory-hero {
  position: sticky;
  top: 0;
  z-index: 5;
  overflow: hidden;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(13, 35, 24, 0.12);
  backdrop-filter: blur(18px);
}

.directory-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green) 0 42%, var(--purple) 42% 68%, var(--red) 68% 100%);
}

.directory-hero::after {
  content: "6 cards";
  position: absolute;
  right: 20px;
  top: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(8, 116, 63, 0.16);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.company-logo {
  display: block;
  width: 100%;
  height: auto;
}

.directory-hero div {
  min-width: 0;
  padding-right: 92px;
}

.directory-hero p,
.employee-copy p {
  margin: 0;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.15;
  text-transform: uppercase;
}

.directory-hero h1 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.05;
}

.directory-hero span {
  display: block;
  margin-top: 8px;
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.42;
}

.employee-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.employee-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(225, 232, 226, 0.9);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(13, 35, 24, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.employee-card:hover {
  border-color: rgba(8, 116, 63, 0.22);
  box-shadow: 0 16px 38px rgba(13, 35, 24, 0.11);
  transform: translateY(-2px);
}

.employee-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--green);
}

.employee-card:nth-child(2)::before,
.employee-card:nth-child(5)::before {
  background: var(--purple);
}

.employee-card:nth-child(3)::before,
.employee-card:nth-child(6)::before {
  background: var(--red);
}

.employee-photo {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 18px;
  background: #eef2ef;
  box-shadow:
    0 0 0 1px rgba(184, 154, 82, 0.48),
    0 10px 22px rgba(13, 35, 24, 0.1);
}

.employee-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 53% 16%;
}

.employee-photo--initials {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(8, 116, 63, 0.12), rgba(101, 80, 124, 0.12)),
    #fff;
}

.employee-photo--initials span {
  color: var(--green-dark);
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.employee-copy {
  min-width: 0;
}

.employee-copy h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 1.38rem;
  font-weight: 850;
  line-height: 1.08;
}

.employee-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 7px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.2;
}

.employee-copy em {
  display: block;
  margin-top: 7px;
  color: var(--body);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.employee-link {
  min-width: 118px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(8, 116, 63, 0.16);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.employee-link:hover {
  box-shadow: 0 16px 28px rgba(8, 116, 63, 0.22);
  transform: translateY(-1px);
}

.employee-link svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 680px) {
  .directory-shell {
    padding: 0;
  }

  .directory-hero {
    position: relative;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 22px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .directory-hero::after {
    top: 22px;
    right: 22px;
  }

  .directory-hero div {
    padding-right: 0;
  }

  .company-logo {
    width: min(100%, 230px);
  }

  .employee-grid {
    gap: 10px;
    padding: 10px 10px 16px;
    margin-top: 0;
  }

  .employee-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .employee-photo {
    width: 76px;
    height: 76px;
    border-radius: 16px;
  }

  .employee-link {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .employee-copy h2 {
    font-size: 1.28rem;
  }
}
