/*
Theme Name: Fieldnote
Theme URI: https://aggreychemwa.com
Author: Built for Aggrey Chemwa
Description: A portfolio theme for conservation scientists and field researchers. Homepage sections, projects and publications are all editable from Appearance > Customize and the admin menu, with no code required.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fieldnote
Tags: portfolio, one-column, two-columns, custom-menu, custom-logo, featured-images, translation-ready, blog
*/

:root {
  --forest:      #1B4332;
  --forest-deep: #143026;
  --forest-mid:  #2C5A44;
  --olive:       #52734D;
  --olive-pale:  #C7D6CE;
  --gold:        #C9A227;
  --gold-deep:   #8A6E12;
  --white:       #FFFFFF;
  --grey:        #F7F8FA;
  --grey-line:   #E4E7E2;
  --ink:         #23272A;
  --ink-soft:    #5A6360;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --wrap: 1140px;
  --gut:  clamp(20px, 5vw, 48px);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--olive); text-decoration: none; }
a:hover { color: var(--gold-deep); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--forest); color: #fff; padding: 12px 20px;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--forest);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1.1em; }

.lede { font-size: 1.08rem; color: var(--ink-soft); }

/* Field label — the mono specimen-tag device used site-wide */
.field-label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 14px;
  display: block;
}
.on-dark .field-label, .band-dark .field-label { color: var(--gold); }

.meta {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.rule {
  width: 52px; height: 2px; background: var(--gold);
  border: 0; margin: 0 0 22px;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- layout ---------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

.band { padding: clamp(56px, 8vw, 96px) 0; }
.band-grey  { background: var(--grey); }
.band-dark  { background: var(--forest); color: #DCE5E0; }
.band-olive { background: var(--olive); color: #EDF2EB; }
.band-dark h2, .band-dark h3, .band-olive h2, .band-olive h3 { color: #fff; }
.band-dark p, .band-olive p { color: inherit; }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head p { color: var(--ink-soft); margin: 0; }
.band-dark .section-head p { color: var(--olive-pale); }

.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
  cursor: pointer;
}
.btn-gold  { background: var(--gold); color: #3B2E05; }
.btn-gold:hover  { background: #B08E1C; color: #3B2E05; }
.btn-forest { background: var(--forest); color: #fff; }
.btn-forest:hover { background: var(--forest-mid); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-line  { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-line:hover { background: var(--forest); color: #fff; }

.arrow-link {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-block;
}
.arrow-link:hover { color: var(--forest); }
.arrow-link::after { content: " \2192"; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--grey-line);
}
.head-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 74px;
}
.brand { font-family: var(--display); font-size: 1.32rem; color: var(--forest); line-height: 1.1; }
.brand span { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--olive); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: .84rem; color: var(--ink); padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--forest); border-bottom-color: var(--gold); }
.nav a.active { color: var(--forest); border-bottom-color: var(--gold); }
.nav .btn { color: #3B2E05; border-bottom: 0; padding: 11px 20px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--grey-line);
  border-radius: 2px; padding: 8px 12px; font-size: 1.1rem; color: var(--forest); cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: var(--forest) center/cover no-repeat;
  /* Drop your hero photograph in as: background-image: url(../img/hero.jpg) */
  color: #fff;
  padding: 100px 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,48,38,.72), rgba(20,48,38,.86));
}
.hero .wrap { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { color: #fff; margin-bottom: 0; }
.hero .rule { margin: 26px auto; }
.hero p { color: #C7D6CE; font-size: 1.05rem; max-width: 540px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.page-hero {
  background: var(--forest);
  color: #fff; text-align: center;
  padding: clamp(64px, 9vw, 110px) 0;
}
.page-hero h1 { color: #fff; margin-bottom: 0; }
.page-hero .rule { margin: 22px auto; }
.page-hero p { color: var(--olive-pale); max-width: 560px; margin: 0 auto; }

/* ---------- about split ---------- */

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.split .kicker { font-family: var(--display); font-style: italic; color: var(--olive); font-size: 1.1rem; margin-bottom: 16px; }

/* ---------- impact counters ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 34px 20px; }
.stat { text-align: center; }
.stat .num {
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat .lab {
  font-size: .78rem; color: var(--olive-pale); margin-top: 10px;
  letter-spacing: .02em;
}

/* ---------- cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-top: 3px solid var(--gold);
  border-radius: 0;
  padding: 28px 26px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--olive); border-top-color: var(--gold); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--ink-soft); margin: 0; }
.card ul { margin: 12px 0 0; padding-left: 18px; font-size: .89rem; color: var(--ink-soft); }
.card ul li { margin-bottom: 5px; }
.card .icon { font-size: 1.5rem; color: var(--olive); display: block; margin-bottom: 14px; }

.card-plain { border-top-color: var(--grey-line); }

/* ---------- photo placeholders ---------- */

.ph {
  background: var(--grey);
  border: 1px dashed #B9C0BB;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: #7C8681; padding: 16px; min-height: 200px;
}
.ph-tall { min-height: 320px; }
.ph-wide { min-height: 170px; }

/* ---------- project cards ---------- */

.project { background: var(--white); border: 1px solid var(--grey-line); }
.project .ph { border: 0; border-bottom: 1px solid var(--grey-line); min-height: 190px; }
.project .body { padding: 22px 24px 26px; }
.project h3 { margin-bottom: 8px; }
.project p { font-size: .9rem; color: var(--ink-soft); }
.project .meta { display: block; margin-bottom: 14px; }

/* ---------- publications ---------- */

.pub {
  border-bottom: 1px solid var(--grey-line);
  padding: 26px 0;
  display: grid; grid-template-columns: 92px 1fr; gap: 26px;
}
.pub:first-of-type { border-top: 1px solid var(--grey-line); }
.pub .year { font-family: var(--mono); font-size: 1.05rem; color: var(--gold-deep); }
.pub h3 { font-size: 1.08rem; margin-bottom: 6px; }
.pub .authors { font-size: .88rem; color: var(--ink-soft); margin-bottom: 8px; }
.pub .links { display: flex; gap: 18px; flex-wrap: wrap; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.filters button {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  background: transparent; border: 1px solid var(--grey-line); color: var(--ink-soft);
  padding: 9px 16px; cursor: pointer; border-radius: 2px;
}
.filters button:hover { border-color: var(--olive); color: var(--forest); }
.filters button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

/* ---------- insights ---------- */

.post { background: var(--white); border: 1px solid var(--grey-line); display: flex; flex-direction: column; }
.post .body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.post h3 { font-size: 1.1rem; }
.post p { font-size: .9rem; color: var(--ink-soft); flex: 1; }
.post .meta { margin-bottom: 12px; }

/* ---------- form ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-size: .78rem; letter-spacing: .04em; color: var(--forest); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font-family: var(--body); font-size: .95rem; color: var(--ink);
  background: var(--white); border: 1px solid #D6DAD5; border-radius: 2px;
  padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px rgba(82,115,77,.14); }
textarea { min-height: 140px; resize: vertical; }
.full { grid-column: 1 / -1; }

.note {
  background: var(--white); border-left: 3px solid var(--gold);
  padding: 18px 20px; font-size: .9rem; color: var(--ink-soft);
}

.contact-list { list-style: none; margin: 0 0 26px; padding: 0; font-size: .95rem; }
.contact-list li { padding: 9px 0; border-bottom: 1px solid var(--grey-line); }
.contact-list .meta { display: block; margin-bottom: 2px; }

/* ---------- footer ---------- */

.site-foot { background: var(--forest); color: var(--olive-pale); padding: 64px 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1.4fr; gap: 36px; }
.site-foot h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-foot .rule { width: 34px; margin-bottom: 16px; }
.site-foot a { color: var(--olive-pale); font-size: .88rem; }
.site-foot a:hover { color: var(--gold); }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 8px; }
.foot-brand { font-family: var(--display); font-size: 1.3rem; color: #fff; margin-bottom: 4px; }
.foot-role { font-size: .84rem; line-height: 1.9; margin-bottom: 18px; }
.socials { display: flex; gap: 14px; font-size: 1.15rem; }
.socials a { color: var(--gold); }
.socials a:hover { color: #fff; }
.news-form { display: flex; gap: 8px; margin-top: 12px; }
.news-form input { padding: 10px 12px; font-size: .85rem; border: 0; }
.news-form button { border: 0; }
.foot-bar {
  margin-top: 52px; background: var(--forest-deep);
  padding: 18px 0; font-size: .78rem; color: #8FA69A;
}
.foot-bar .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--grey-line);
    padding: 8px var(--gut) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--grey-line); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
  .site-head .wrap { position: relative; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .hero { min-height: 70vh; }
}


/* ============================================================
   WordPress core classes
   ============================================================ */

.alignleft  { float: left;  margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide  { width: 100%; }
.alignfull  { width: 100%; }
.wp-caption { max-width: 100%; margin-bottom: 1.4em; }
.wp-caption-text, .wp-block-image figcaption {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--ink-soft); text-align: center; margin-top: 10px;
}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sticky .entry-title::after {
  content: " \2022 Pinned"; font-family: var(--mono); font-size: .6rem;
  letter-spacing: .14em; color: var(--gold-deep); vertical-align: middle;
}
.bypostauthor > article { border-left: 2px solid var(--gold); padding-left: 16px; }

/* ---------- single entry ---------- */

.entry-content { max-width: 720px; }
.entry-content > * { margin-bottom: 1.3em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content blockquote {
  border-left: 3px solid var(--gold); margin: 1.8em 0; padding: 4px 0 4px 24px;
  font-family: var(--display); font-size: 1.15rem; font-style: italic; color: var(--forest);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li { margin-bottom: .5em; }
.entry-content code, .entry-content pre {
  font-family: var(--mono); font-size: .88rem; background: var(--grey);
}
.entry-content code { padding: 2px 6px; }
.entry-content pre { padding: 18px 20px; overflow-x: auto; border-left: 3px solid var(--olive); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.entry-content th, .entry-content td { border: 1px solid var(--grey-line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--grey); font-weight: 500; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-footer { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--grey-line); }

.entry-thumb { margin-bottom: 36px; }
.entry-thumb img { width: 100%; height: auto; }

/* ---------- pagination ---------- */

.pagination { margin-top: 56px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
  font-family: var(--mono); font-size: .78rem;
  padding: 10px 15px; border: 1px solid var(--grey-line); color: var(--ink-soft);
}
.pagination .page-numbers:hover { border-color: var(--olive); color: var(--forest); }
.pagination .page-numbers.current { background: var(--forest); border-color: var(--forest); color: #fff; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; }
.post-nav a { display: block; border: 1px solid var(--grey-line); padding: 20px 22px; }
.post-nav a:hover { border-color: var(--olive); }
.post-nav .meta { display: block; margin-bottom: 6px; }
.post-nav .title { font-family: var(--display); color: var(--forest); font-size: 1.02rem; }
.post-nav .next { text-align: right; }

/* ---------- comments ---------- */

.comments-area { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--grey-line); max-width: 720px; }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list ol { list-style: none; padding-left: 26px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--grey-line); }
.comment-author img { border-radius: 50%; margin-right: 10px; vertical-align: middle; }
.comment-metadata { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-soft); text-transform: uppercase; }
.comment-reply-link { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.comment-form p { margin-bottom: 14px; }

/* ---------- widgets ---------- */

.widget { margin-bottom: 34px; }
.widget-title { font-size: 1rem; color: #fff; margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin-bottom: 8px; font-size: .88rem; }
.site-foot .widget-title { color: #fff; }

/* ---------- admin bar offset ---------- */

body.admin-bar .site-head { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-head { top: 46px; } }
@media (max-width: 900px) { body.admin-bar .nav { top: 74px; } }
