/* ========== RESET ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ========== CUSTOM PROPERTIES ========== */
:root {
  --color-forest: #2D4A3E;
  --color-sage: #7A9E7E;
  --color-moss: #507E60;
  --color-clay: #B8704B;
  --color-sandstone: #E8DCC8;
  --color-cream: #F5F1EB;
  --color-slate: #3A3A3A;
  --color-white: #FFFFFF;

  --color-text: var(--color-slate);
  --color-heading: var(--color-forest);
  --color-link: var(--color-moss);
  --color-link-hover: var(--color-clay);
  --color-bg-primary: var(--color-cream);
  --color-bg-alt: var(--color-sandstone);
  --color-accent: var(--color-clay);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --max-width: 1100px;
  --nav-height: 72px;
}

/* ========== BASE STYLES ========== */
html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-link);
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-hover);
}

/* ========== UTILITIES ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
  scroll-margin-top: var(--nav-height);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-weight: 700;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--color-forest);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ========== NAVIGATION ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  height: var(--nav-height);
}

.nav__brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  transition: color 0.3s ease;
}

.nav__brand:hover {
  color: var(--color-sandstone);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 101;
}

.nav__toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-white);
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.nav__list {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.nav__link {
  color: var(--color-white);
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-clay);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__link:hover {
  color: var(--color-sandstone);
}

/* Scrolled navbar state */
.site-header.scrolled {
  background-color: var(--color-forest);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .nav__brand {
  color: var(--color-white);
}

.site-header.scrolled .nav__link {
  color: var(--color-sandstone);
}

.site-header.scrolled .nav__link:hover {
  color: var(--color-white);
}

/* Mobile nav */
@media (max-width: 639px) {
  .nav__toggle {
    display: block;
  }

  .nav__list {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    background-color: var(--color-forest);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: var(--space-lg) var(--space-md);
  }

  .nav__list.nav-open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.25rem;
    color: var(--color-sandstone);
  }

  /* Hamburger to X animation */
  .nav__toggle.active .nav__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.active .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active .nav__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: url('../img/landing/beehive.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(45, 74, 62, 0.5) 0%,
    rgba(45, 74, 62, 0.7) 100%
  );
}

.hero__content {
  position: relative;
  text-align: center;
  padding: var(--space-md);
  max-width: 800px;
}

.hero__title {
  color: var(--color-white);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero__subtitle {
  color: var(--color-sandstone);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-sandstone);
  border-bottom: 2px solid var(--color-sandstone);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { translate: 0 0; }
  40% { translate: 0 8px; }
  60% { translate: 0 4px; }
}

/* ========== ABOUT ========== */
.about {
  text-align: center;
}

.about__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--color-sage);
}

.about__bio {
  max-width: 680px;
  margin: 0 auto var(--space-md);
  font-size: 1.125rem;
}

.about__links {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.about__links a {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-sage);
  border-radius: 4px;
  transition: all 0.2s ease;
}

.about__links a:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
}

/* ========== FOUR PILLARS ========== */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.pillar {
  background-color: var(--color-white);
  border-left: 4px solid var(--color-clay);
  border-radius: 4px;
  padding: var(--space-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.pillar__icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.pillar__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.pillar__text {
  margin-bottom: 0;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 639px) {
  .pillars__grid {
    grid-template-columns: 1fr;
  }
}

/* ========== CAREER TIMELINE ========== */
.timeline {
  position: relative;
  padding: var(--space-md) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background-color: var(--color-sage);
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 var(--space-lg) var(--space-lg) 0;
}

.timeline__item:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 var(--space-lg) var(--space-lg);
}

.timeline__item::before {
  content: '';
  position: absolute;
  top: 8px;
  width: 14px;
  height: 14px;
  background-color: var(--color-clay);
  border: 3px solid var(--color-cream);
  border-radius: 50%;
  z-index: 1;
}

.timeline__item:nth-child(odd)::before {
  right: -7px;
}

.timeline__item:nth-child(even)::before {
  left: -7px;
}

.timeline__card {
  background-color: var(--color-white);
  border-radius: 4px;
  padding: var(--space-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.timeline__card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.timeline__card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: var(--space-xs);
}

.timeline__date {
  display: block;
  font-size: 0.875rem;
  color: var(--color-moss);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.timeline__role {
  font-size: 0.8125rem;
  color: var(--color-sage);
}

.timeline__footer {
  text-align: center;
  margin-top: var(--space-md);
}

/* Responsive video embed */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: var(--space-sm);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}

/* Timeline responsive */
@media (max-width: 900px) {
  .timeline::before {
    left: 20px;
  }

  .timeline__item,
  .timeline__item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 var(--space-md) calc(20px + var(--space-md) + 7px);
  }

  .timeline__item::before,
  .timeline__item:nth-child(even)::before {
    left: 13px;
    right: auto;
  }
}

/* ========== SITE BOTTOM (shared contour background) ========== */
.site-bottom {
  background-color: var(--color-forest);
  position: relative;
  overflow: hidden;
}

.site-bottom::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/landing/contour_map.svg');
  background-size: cover;
  background-position: center;
  opacity: 0.075;
  pointer-events: none;
}

/* ========== CONNECT ========== */

.connect__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.connect__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--color-sage);
  flex-shrink: 0;
}

.connect__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.connect__title {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.connect__text {
  color: var(--color-sandstone);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 520px;
}

.connect__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.btn--outline {
  background-color: transparent;
  border: 2px solid var(--color-sandstone);
  color: var(--color-sandstone);
}

.btn--outline:hover {
  background-color: var(--color-sandstone);
  color: var(--color-forest);
}

@media (min-width: 640px) {
  .connect__inner {
    flex-direction: row;
    text-align: left;
  }

  .connect__content {
    align-items: flex-start;
  }

  .connect__actions {
    justify-content: flex-start;
  }
}

/* ========== FOOTER ========== */
.footer {
  color: var(--color-sandstone);
  padding: var(--space-md) 0;
  text-align: center;
  position: relative;
}

.footer p {
  margin: 0;
  font-size: 0.875rem;
}

.footer a {
  color: var(--color-sandstone);
}

.footer a:hover {
  color: var(--color-white);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children within pillars grid */
.pillars__grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.pillars__grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.pillars__grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ========== RESPONSIVE ========== */
@media (min-width: 640px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .hero__title { font-size: 4rem; }
  .hero__subtitle { font-size: 1.5rem; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero__title,
  .hero__subtitle {
    animation: none;
    opacity: 1;
  }

  .animate-on-scroll {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .hero {
    background-attachment: scroll;
  }
}
