/* ===========================
   Variables & Reset
   =========================== */
:root {
  --sage: #7C9A82;
  --sage-dark: #5F7D65;
  --sage-light: #A8C0AD;
  --cream: #FDF8F3;
  --cream-dark: #F0EAE0;
  --gold: #C9A96E;
  --gold-dark: #B08F50;
  --text: #2C2420;
  --text-muted: #6B5E54;
  --white: #FFFFFF;
  --border: rgba(44, 36, 32, 0.08);

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

  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sage-dark);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gold-dark);
}

ul {
  list-style: none;
}

/* ===========================
   Grain Texture Overlay
   =========================== */
.grain::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===========================
   Scroll Progress Bar
   =========================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  z-index: 1001;
  transform-origin: left;
  transform: scaleX(0);
  width: 100%;
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

/* Eyebrow label */
.eyebrow {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 12px;
}

.eyebrow--light {
  color: var(--gold);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw + 0.5rem, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  color: var(--text);
  position: relative;
  letter-spacing: -0.01em;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(253, 248, 243, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(44, 36, 32, 0.06);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sage-dark);
  letter-spacing: 0.02em;
}

.nav-logo:hover {
  color: var(--sage);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link--cta {
  background: var(--sage);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 4px;
  text-transform: uppercase;
}

.nav-link--cta::after {
  display: none;
}

.nav-link--cta:hover {
  background: var(--sage-dark);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===========================
   Hero
   =========================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(165deg, var(--cream) 0%, #F5EDE4 50%, #F0E4D4 100%);
  padding-top: var(--nav-height);
  position: relative;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Word-by-word reveal */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i) * 0.1s + 0.3s);
}

.hero-reveal-line {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--i) * 0.1s + 0.3s);
}

body.loaded .hero-word,
body.loaded .hero-reveal-line {
  opacity: 1;
  transform: translateY(0);
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: var(--sage-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 48px;
}

.hero-scroll {
  display: inline-flex;
  color: var(--sage);
  animation: bounce 2s infinite;
  animation-delay: 1.5s;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* ===========================
   About
   =========================== */
.about {
  background: var(--white);
}

.about-layout {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
}

.headshot-wrapper {
  flex-shrink: 0;
  position: relative;
}

.headshot-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: var(--cream);
  border-radius: 55% 45% 60% 40% / 50% 55% 45% 50%;
  z-index: 0;
}

.headshot {
  position: relative;
  z-index: 1;
  width: 280px;
  height: auto;
  border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(44, 36, 32, 0.1);
}

.about-content {
  text-align: left;
}

.about-content p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-content p:last-child {
  margin-bottom: 0;
}

/* ===========================
   Services
   =========================== */
.services {
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(44, 36, 32, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(44, 36, 32, 0.08);
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--cream);
  border-radius: 50%;
  margin-bottom: 24px;
  color: var(--sage);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--text);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===========================
   Results / Stats
   =========================== */
.results {
  background: var(--sage);
  color: var(--white);
}

.results .section-heading {
  color: var(--white);
}

.results .section-heading::after {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

/* ===========================
   Clients / Marquee
   =========================== */
.clients {
  background: var(--white);
  overflow: hidden;
}

/* Logo marquee */
.logo-marquee {
  position: relative;
  overflow: hidden;
  padding: 16px 0;
}

.logo-marquee::before,
.logo-marquee::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.logo-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--white), transparent);
}

.logo-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--white), transparent);
}

.logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marquee 50s linear infinite;
}

.logo-marquee:hover .logo-marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.client-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.45);
  transition: filter 0.4s ease;
  flex-shrink: 0;
}

.client-logo:hover {
  filter: grayscale(0%) opacity(1);
}

/* Text fallback for orgs without logos */
.client-name {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--cream);
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  height: 48px;
  transition: background 0.3s ease, color 0.3s ease;
}

.client-name:hover {
  background: var(--sage-light);
  color: var(--white);
}

/* ===========================
   Testimonials
   =========================== */
.testimonials {
  background: var(--cream);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial {
  background: var(--white);
  padding: 36px 32px;
  border-radius: 12px;
  border-left: 4px solid var(--gold);
  box-shadow: 0 4px 20px rgba(44, 36, 32, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(44, 36, 32, 0.06);
}

.testimonial p {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

.testimonial cite {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===========================
   Experience / Timeline
   =========================== */
.experience {
  background: var(--white);
}

.timeline {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--sage-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border: 3px solid var(--sage);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:first-child .timeline-marker {
  background: var(--sage);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.timeline-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text);
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--sage-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-details {
  list-style: disc;
  padding-left: 20px;
}

.timeline-details li {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ===========================
   Education & Skills
   =========================== */
.education {
  background: var(--cream);
}

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  background: var(--white);
  padding: 36px 32px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(44, 36, 32, 0.04);
}

.education-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cream);
}

.edu-item {
  margin-bottom: 16px;
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}

.edu-item span {
  display: block;
  font-size: 0.85rem;
  color: var(--sage-dark);
  margin-bottom: 2px;
}

.edu-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.skill-category {
  margin-bottom: 16px;
}

.skill-category:last-child {
  margin-bottom: 0;
}

.skill-category h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  display: inline-block;
  padding: 5px 14px;
  background: var(--cream);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: background 0.3s ease, color 0.3s ease;
}

.skill-tag:hover {
  background: var(--sage-light);
  color: var(--white);
}

/* ===========================
   Footer / Contact
   =========================== */
.footer {
  background: var(--sage);
  color: var(--white);
  padding: 80px 0 32px;
  text-align: center;
}

.footer .section-heading {
  color: var(--white);
}

.footer .section-heading::after {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.footer-text {
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 32px;
}

.contact-email {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.8);
  user-select: all;
  opacity: 0.95;
  font-weight: 300;
}

.btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  background: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ===========================
   Scroll Animations
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children within a group */
.stagger-group .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger-group .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger-group .fade-in:nth-child(3) { transition-delay: 0.15s; }
.stagger-group .fade-in:nth-child(4) { transition-delay: 0.2s; }

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .hero-word,
  .hero-reveal-line {
    opacity: 1;
    transform: none;
  }

  .logo-marquee-track {
    animation: none;
  }

  .scroll-progress {
    display: none;
  }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 24px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .education-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .about-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-content {
    text-align: center;
  }

  .headshot {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-heading {
    font-size: 1.8rem;
    margin-bottom: 36px;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(253, 248, 243, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link--cta {
    display: inline-block;
    margin-top: 12px;
    border-bottom: none;
  }

  /* Hamburger animation */
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Marquee edge fade */
  .logo-marquee::before,
  .logo-marquee::after {
    width: 40px;
  }

  .client-logo {
    height: 36px;
  }

  .logo-marquee-track {
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 56px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .client-name {
    font-size: 0.8rem;
    padding: 8px 16px;
  }
}
