/* ==========================================================================
   Emily Howell — Personal Site
   Simple, green-based, responsive
   ========================================================================== */

:root {
  --green-900: #14352a;
  --green-800: #1c4c39;
  --green-700: #276a4f;
  --green-600: #31805f;
  --green-500: #3f9a72;
  --green-300: #8fc9ab;
  --green-200: #bfe0cd;
  --green-100: #dff0e6;
  --green-50: #f2f9f4;

  --ink: #16211c;
  --ink-soft: #44564c;
  --ink-faint: #6d7f74;

  --paper: #ffffff;
  --cream: #f6faf6;
  --line: #dce7df;
  --line-strong: #c7d8cc;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(20, 53, 42, 0.06);
  --shadow: 0 12px 32px rgba(20, 53, 42, 0.10);

  --maxw: 1120px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  --font-body: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-head: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

picture { display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--green-900);
  line-height: 1.25;
  margin: 0 0 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--green-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
a:hover { color: var(--green-500); }

ul { padding-left: 1.15rem; }
li { margin-bottom: 0.4rem; }

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3rem, 7vw, 5.25rem);
}

.section--tint { background: var(--cream); }

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 0.85rem;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--green-300);
  border-radius: 2px;
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-soft);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--green-800);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}


/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--green-900);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--green-700); }

.brand__mark {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--green-500), var(--green-800));
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand__text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.4rem 0.15rem;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--green-500);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.nav__link:hover { color: var(--green-800); }
.nav__link:hover::after,
.nav__link[aria-current="true"]::after { transform: scaleX(1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.68rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--green-700);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--green-800);
  color: #fff;
  box-shadow: 0 6px 18px rgba(20, 53, 42, 0.22);
}

.btn--ghost {
  background: transparent;
  border-color: var(--green-300);
  color: var(--green-800);
}
.btn--ghost:hover {
  border-color: var(--green-600);
  background: var(--green-50);
  color: var(--green-900);
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  color: #f4fbf6;
  background:
    radial-gradient(1100px 480px at 82% -10%, rgba(143, 201, 171, 0.30), transparent 60%),
    radial-gradient(760px 420px at 8% 110%, rgba(63, 154, 114, 0.28), transparent 62%),
    linear-gradient(150deg, var(--green-900) 0%, var(--green-800) 52%, var(--green-700) 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.22;
  pointer-events: none;
}
.hero__bg picture { height: 100%; }
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: grayscale(18%);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(15, 42, 32, 0.92) 0%,
    rgba(20, 53, 42, 0.62) 55%,
    rgba(20, 53, 42, 0.30) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3.25rem, 8vw, 5.75rem);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  border: 1px solid rgba(143, 201, 171, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-100);
  margin-bottom: 1.35rem;
}
.hero__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-300);
  box-shadow: 0 0 0 4px rgba(143, 201, 171, 0.22);
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 1.1rem;
}
.hero h1 span {
  display: block;
  color: var(--green-300);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin-top: 0.9rem;
}

.hero__lead {
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
  color: rgba(234, 248, 240, 0.9);
  max-width: 40rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}
.hero .btn--ghost {
  border-color: rgba(223, 240, 230, 0.45);
  color: #fff;
}
.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--green-100);
  color: #fff;
}

.hero__figure {
  justify-self: end;
  width: min(100%, 275px);
}
.hero__portrait {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(223, 240, 230, 0.35);
  box-shadow: 0 24px 60px rgba(9, 28, 21, 0.42);
  background: var(--green-100);
}
.hero__portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
}
.hero__caption {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: rgba(223, 240, 230, 0.68);
  text-align: center;
}

/* ==========================================================================
   About / Bio
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.about__body p + p { margin-top: 1rem; }

.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.fact {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.fact__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 0.72rem;
  font-weight: 700;
}

.fact__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.2rem;
}

.fact__value {
  font-size: 0.98rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.card {
  padding: 1.5rem 1.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-500);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5rem; }
.card p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  margin: 0;
}
.card__meta {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 0.6rem;
}

/* ==========================================================================
   Research / Positions
   ========================================================================== */
.positions {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  padding: 0;
  position: relative;
}
.positions::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: linear-gradient(180deg, var(--green-500), var(--green-200));
  border-radius: 2px;
}
.positions li {
  position: relative;
  padding: 0 0 1.6rem 2.2rem;
}
.positions li:last-child { padding-bottom: 0; }
.positions li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.42rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--green-600);
}
.positions .pos__role {
  display: block;
  font-family: var(--font-head);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}
.positions .pos__org {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.positions .pos__dates {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-600);
}

/* ==========================================================================
   Publications
   ========================================================================== */
.section--alt {
  background:
    linear-gradient(180deg, var(--green-50) 0%, #ffffff 60%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pub-list {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
}

.pub {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.1rem 1.35rem;
  padding: 1.3rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.pub:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--green-200);
}

.pub__year {
  align-self: start;
  min-width: 3.4rem;
  padding: 0.3rem 0.6rem;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--green-800);
  background: var(--green-100);
  border-radius: var(--radius-sm);
}

.pub__title {
  margin: 0 0 0.3rem;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.4;
}
.pub__authors {
  margin: 0 0 0.3rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.pub__authors strong { color: var(--ink); }
.pub__venue {
  margin: 0;
  font-size: 0.93rem;
  font-style: italic;
  color: var(--ink-faint);
}
.pub__links {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--paper);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.contact__body p {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

.contact-methods {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.contact-methods a,
.contact-methods > li > span {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.contact-methods a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--green-300);
}
.contact-methods .cm__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 1.1rem;
  font-weight: 700;
}
.contact-methods .cm__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}
.contact-methods .cm__value {
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

.contact-cta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: 0;
  padding: clamp(2.25rem, 5vw, 3rem) 0 1.75rem;
  background: var(--green-900);
  color: rgba(223, 240, 230, 0.82);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffffff;
}
.site-footer__brand .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-700);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  color: rgba(223, 240, 230, 0.82);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: #ffffff; }
.site-footer__legal {
  width: 100%;
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(223, 240, 230, 0.16);
  font-size: 0.85rem;
  color: rgba(223, 240, 230, 0.6);
  text-align: center;
}

/* ==========================================================================
   Reveal-on-scroll animation
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about__grid,
  .contact__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }
  .hero__figure {
    order: -1;
    justify-self: center;
    max-width: 320px;
  }
  .hero__lead { max-width: none; }
  .hero__actions { justify-content: center; }
}

@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }
  /* No-JS fallback: keep the menu usable when the toggle cannot work. */
  html:not(.js) .nav__toggle { display: none; }
  html:not(.js) .nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    padding-block: 0.35rem;
  }
  html:not(.js) .nav__list { flex-wrap: wrap; gap: 0.6rem 1rem; }
  html.js .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem var(--gutter) 1.1rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
  }
  html.js .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav li { width: 100%; }
  .nav__link {
    display: block;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }
  .nav__link::after { display: none; }
  .nav__button {
    margin-top: 0.9rem;
    justify-content: center;
    padding: 0.85rem 1.4rem;
  }
  .site-footer__inner { justify-content: center; text-align: center; }
  .footer-nav { justify-content: center; }
}

@media (max-width: 560px) {
  .pub {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
  .pub__year { justify-self: start; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .contact-methods a,
  .contact-methods > li > span { grid-template-columns: 1fr; }
  .contact-methods .cm__icon { width: 40px; height: 40px; }
}

.badge:hover {
  color: #ffffff;
  background: var(--green-700);
  border-color: var(--green-700);
}
.badge--open {
  color: var(--green-700);
  background: var(--green-50);
  border-color: var(--green-200);
}
.badge--open:hover {
  color: #ffffff;
  background: var(--green-600);
  border-color: var(--green-600);
}

.pub-note {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}


