.author-main {
  --author-dark: #1b2e1c;
  --author-darker: #122014;
  --author-text: #42493d;
  --author-accent: #b9dca2;
  --author-ring: rgba(74, 130, 53, 0.35);
  /* Content below the hero follows the new service design (service-new.css) */
  --author-yellow: #f4b92c;
  --author-surface: #f8f9fa;
  --author-border: #e5e7eb;
  --author-muted: #6b7568;
}

/**
 * Hero
 */

.author-hero {
  position: relative;
  overflow: hidden;
  /* Fixed header (≈204px) sits on top of the hero */
  padding: 236px 0 80px;
  color: var(--white1);
  background:
    radial-gradient(circle at 16% 78%, rgba(74, 130, 53, 0.55) 0, rgba(74, 130, 53, 0) 42%),
    linear-gradient(135deg, var(--author-darker) 0%, var(--author-dark) 50%, #2b4a25 100%);
}

.author-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/themes/ekoenergas/assets/img/wave.svg");
  background-repeat: no-repeat;
  background-position: calc(100% + 360px) 40%;
  opacity: 0.12;
  pointer-events: none;
}

.author-hero .container {
  position: relative;
  z-index: 1;
}

.author-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 44px;
  color: var(--white-transparent);
}

.author-breadcrumbs a {
  color: var(--white1);
  transition: color 0.2s ease;
}

.author-breadcrumbs a:hover {
  color: var(--author-accent);
}

.author-hero__inner {
  display: flex;
  align-items: center;
  gap: 72px;
}

/* Photo with concentric brand rings */

.author-hero__photo {
  position: relative;
  flex-shrink: 0;
  width: 232px;
  height: 232px;
  margin: 40px;
  border-radius: 50%;
  border: 4px solid var(--white1);
  background-color: var(--green1);
  box-shadow:
    0 0 0 14px var(--author-ring),
    0 0 0 28px rgba(74, 130, 53, 0.2),
    0 0 0 44px rgba(74, 130, 53, 0.1),
    0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-hero__photo picture,
.author-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-hero__initials {
  font-family: "RoobertPRO";
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  color: var(--white1);
}

/* Info */

.author-hero__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.author-hero__position {
  margin-top: 6px;
  color: var(--author-accent);
}

.author-hero__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 20px;
  border-radius: 8px;
  background-color: var(--white1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.author-hero__social:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.author-hero__expertise {
  margin-top: 24px;
}

.author-hero__expertise > p {
  margin-bottom: 10px;
  color: var(--white1);
}

.author-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.author-chips li {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white1);
}

/**
 * Content sections
 */

.author-section-heading {
  margin-bottom: 48px;
  text-align: center;
}

.author-section-heading .h2 {
  color: var(--author-dark);
}

.author-section-heading__accent {
  display: block;
  width: 96px;
  height: 4px;
  margin: 16px auto 0;
  background: var(--author-yellow);
}

/**
 * About
 */

.author-about {
  padding: 80px 0;
  background: var(--white1);
}

.author-about__content {
  max-width: 864px;
  margin: 0 auto;
  color: var(--author-text);
  font-size: 16px;
  line-height: 26px;
  font-weight: 500;
}

.author-about__content p,
.author-about__content ul,
.author-about__content ol {
  margin: 0 0 16px;
}

.author-about__content > :last-child {
  margin-bottom: 0;
}

.author-about__content strong,
.author-about__content b {
  font-weight: 700;
  color: var(--author-dark);
}

.author-about__content a {
  color: var(--green1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.author-about__content ul {
  list-style: none;
  padding: 0;
}

.author-about__content ul > li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
}

.author-about__content ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--green1);
}

.author-about__content ol {
  padding-left: 24px;
}

.author-about__content ol > li::marker {
  color: var(--green1);
  font-weight: 700;
}

/**
 * Articles
 */

.author-articles {
  padding: 80px 0 96px;
  background: var(--author-surface);
  scroll-margin-top: 110px;
}

.author-articles__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.author-card {
  min-width: 0;
}

.author-card__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 24px;
  height: 100%;
  padding: 24px;
  border-radius: 12px;
  background-color: var(--white1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.author-card__link:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.author-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.author-card__title {
  margin: 0 0 8px;
  color: var(--author-dark);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.author-card__link:hover .author-card__title {
  color: var(--green1);
}

.author-card__excerpt {
  color: var(--author-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.author-card__byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--author-muted);
}

.author-card__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--green1);
  color: var(--white1);
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
}

.author-card__avatar picture,
.author-card__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card__image {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--author-border);
}

.author-card__image picture,
.author-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.author-card__link:hover .author-card__image img {
  transform: scale(1.04);
}

.author-articles__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 30px;
  margin-top: 48px;
}

.author-articles__summary {
  color: var(--author-muted);
}

.author-articles__footer .pagination {
  margin: 0;
}

.author-articles__empty {
  max-width: 864px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 12px;
  background-color: var(--white1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  color: var(--author-text);
  text-align: center;
}

/**
 * Responsive
 */

@media screen and (max-width: 1150px) {
  /* Mobile header (≈140px) */
  .author-hero {
    padding-top: 176px;
  }

  .author-hero__inner {
    gap: 48px;
  }

  .author-hero__photo {
    width: 200px;
    height: 200px;
  }

  .author-articles__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .author-hero {
    padding-bottom: 56px;
  }

  .author-breadcrumbs {
    margin-bottom: 24px;
  }

  .author-hero__inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }

  .author-hero__info {
    align-items: center;
  }

  .author-hero__photo {
    width: 168px;
    height: 168px;
    margin: 36px;
  }

  .author-hero__initials {
    font-size: 56px;
  }

  .author-chips {
    justify-content: center;
  }

  .author-about {
    padding: 48px 0;
  }

  .author-articles {
    padding: 48px 0 72px;
  }

  .author-section-heading {
    margin-bottom: 32px;
  }

  .author-articles__footer {
    flex-direction: column-reverse;
  }
}

@media screen and (max-width: 560px) {
  .author-card__link {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 16px 16px 20px;
  }

  .author-card__image {
    order: -1;
    aspect-ratio: 16 / 9;
  }
}

@media screen and (max-width: 500px) {
  /* Mobile header with taller fault bar (≈162px) */
  .author-hero {
    padding-top: 186px;
  }

  .author-hero__photo {
    width: 136px;
    height: 136px;
    margin: 32px;
    box-shadow:
      0 0 0 10px var(--author-ring),
      0 0 0 20px rgba(74, 130, 53, 0.2),
      0 0 0 32px rgba(74, 130, 53, 0.1),
      0 16px 40px rgba(0, 0, 0, 0.35);
  }

  .author-hero__initials {
    font-size: 44px;
  }
}
