/* =========================================================================
   Abbey O'Brien — journalism portfolio
   Edit colors and spacing in the :root variables below.
   ========================================================================= */

:root {
  /* ---- Colors (change these to re-theme the whole site) ---- */
  /* Forest theme: green leaves + rust tree-trunk accents on a pale-green paper */
  --bg:        #f3f6ee;   /* page background (pale fern off-white) */
  --surface:   #ffffff;   /* cards / raised areas */
  --text:      #1c2a1e;   /* main text (deep forest near-black) */
  --muted:     #54624f;   /* secondary text (muted sage-gray) */
  --accent:    #356a45;   /* PRIMARY — links & buttons (fern / forest green = leaves) */
  --accent-dk: #28522f;   /* darker green for hover */
  --rust:      #8f3a1c;   /* SECONDARY — deep terracotta rust (tree trunk) */
  --rust-dk:   #732e15;   /* darker rust for hover */
  --line:      #dce5d2;   /* hairline borders (pale green) */

  /* ---- Type ---- */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---- Layout ---- */
  --maxw: 880px;          /* width of the centered content column */
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dk); text-decoration: underline; }

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

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.2px;
  color: var(--text);
}
.nav__brand:hover { text-decoration: none; color: var(--text); }

.nav__menu {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__menu a {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 500;
}
.nav__menu a:hover { color: var(--accent); text-decoration: none; }

/* hamburger button — hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.hero__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}

.hero__tagline {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 0 30px;
  max-width: 34ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* =========================================================================
   Generic section
   ========================================================================= */
.section {
  padding-top: 64px;
  padding-bottom: 64px;
  border-top: 1px solid var(--line);
}

.section__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 28px;
  letter-spacing: -0.3px;
}
/* rust accent bar under each section heading (the "trunk") */
.section__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 14px;
  background: var(--rust);
  border-radius: 2px;
}

.prose p { margin: 0 0 18px; max-width: 64ch; }
.prose p:last-child { margin-bottom: 0; }

/* =========================================================================
   Journalism / clips
   ========================================================================= */
.featured-in {
  color: var(--muted);
  font-size: 0.95rem;
  margin: -8px 0 32px;
}
.featured-in span { color: var(--rust); font-weight: 600; }

.clips {
  list-style: none;
  margin: 0;
  padding: 0;
}

.clip {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.clip:first-child { border-top: 0; padding-top: 0; }

/* article thumbnail */
.clip__thumb {
  flex: 0 0 190px;
  display: block;
  overflow: hidden;
  border-radius: 8px;
}
.clip__thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--line);
  transition: transform 0.3s ease;
}
.clip__thumb:hover img { transform: scale(1.04); }
.clip__body { flex: 1 1 auto; min-width: 0; }

.clip__link { display: inline-block; }
.clip__headline {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--text);
  transition: color 0.15s ease;
}
.clip__link:hover .clip__headline { color: var(--rust); text-decoration: underline; }

.clip__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: baseline;
  margin: 0 0 8px;
  font-size: 0.92rem;
}
.clip__pub { font-weight: 600; color: var(--rust); }
.clip__date { color: var(--muted); }

.clip__desc { margin: 0; color: var(--muted); max-width: 60ch; }

/* =========================================================================
   Logo strips ("Featured in" publications, "Education" schools)
   ========================================================================= */
.logo-label {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 16px;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 20px;
  height: 58px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.logo-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  text-decoration: none;
}
.logo-chip img {
  height: 24px;
  width: auto;
  display: block;
  /* muted monochrome by default; brand color appears on hover */
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.logo-chip:hover img { filter: grayscale(0); opacity: 1; }

/* spacing for the journalism "featured in" strip */
.journalism-logos { margin-bottom: 36px; }
/* spacing around the education strip + résumé button */
.education-logos { margin: 28px 0 32px; }
#resume .btn { margin-top: 28px; }

/* =========================================================================
   Contact
   ========================================================================= */
.contact__email {
  display: inline-block;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  margin: 8px 0 24px;
  word-break: break-word;
  color: var(--rust);
}
.contact__email:hover { color: var(--rust-dk); }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.socials a:hover { color: var(--rust); }

/* hidden sprite that holds the icon shapes */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: currentColor; display: block; }
.socials--footer .icon { width: 19px; height: 19px; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 40px 0;
  margin-top: 24px;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer__name {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0;
}
.socials--footer { gap: 18px; }
.socials--footer a { color: var(--text); font-size: 0.95rem; }
.socials--footer a:hover { color: var(--accent); }
.footer__copy { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* =========================================================================
   Mobile
   ========================================================================= */
@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 48px;
  }
  .hero__photo { order: -1; max-width: 320px; }

  /* stack article thumbnail above the text on small screens */
  .clip { flex-direction: column; gap: 14px; }
  .clip__thumb { flex: none; width: 100%; }
  .clip__thumb img { aspect-ratio: 16 / 9; }

  .nav__toggle { display: flex; }

  /* mobile dropdown menu */
  .nav__menu {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    /* hidden by default; toggled open via the .is-open class from script.js */
    display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu li { border-top: 1px solid var(--line); }
  .nav__menu a { display: block; padding: 14px 0; }

  /* animate hamburger into an X when open */
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
