/* mgonzaleznoda.com static replica — unified with the photo-essay template:
   warm paper background, one typeface throughout. */
:root {
  --bg: #fbfbf9;
  --ink: #1c1c1a;
  --muted: #6e6e68;
  /* one typeface site-wide, the one the Projects and Photography headings
     use - there is no second family anywhere on the site now */
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.7 var(--sans); text-align: center;
}
h1,h2,h3,h4 { color: var(--ink); font-weight: 500; line-height: 1.3; margin: 0 0 .6em; }
a { color: var(--ink); text-decoration: none; }
a:hover { opacity: .7; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.4em; }

/* top bar — same voice as the essay pages */
.topbar {
  position: sticky; top: 0; z-index: 50; background: var(--bg);
  display: flex; justify-content: space-between; align-items: baseline;
  /* full-bleed bar; contents align with the 1360px content column */
  gap: 20px; padding: 26px max(34px, calc((100% - 1360px) / 2));
  font-family: var(--sans); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase;
}
.topbar a { color: var(--ink); }
.tb-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: flex-end; }
.tb-nav a.active { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

main { padding-bottom: 10vh; }

/* section heading (grid + listing pages) */
.section-title { max-width: 680px; margin: 7vh auto 6vh; padding: 0 22px; text-align: center; }
/* one title treatment site-wide, matching .plain-title on the project
   pages: plain sans, sentence case, centred (2026-07-27) */
.section-title h1 {
  font-family: var(--sans); font-weight: 400; letter-spacing: .06em;
  text-transform: none; font-size: 24px; margin: 0;
}
.section-title p {
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  color: var(--muted); margin: 16px auto 0; max-width: 720px;
  text-align: center;
}
.section-title time { display: block; margin-top: 10px; }

/* portfolio grid (3-col masonry, distributed at build time) */
.portfolio-grid { display: flex; gap: 16px; max-width: 1360px; margin: 0 auto; padding: 0 34px; }
.grid-col { flex: 1 1 33.333%; min-width: 0; }
.grid-item { margin-bottom: 30px; }
.grid-photo { position: relative; display: block; overflow: hidden; background: #eceae5; }
.grid-photo .ph { display: block; position: relative; height: 0; }
.grid-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.grid-photo:hover img { opacity: .85; }
.grid-title {
  margin: 11px 0 0; font-family: var(--sans); font-weight: 400;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.portfolio-flat { display: none; }

/* research listing */
.post-list { max-width: 800px; margin: 0 auto; padding: 0 22px; }
.post-card { display: flex; gap: 26px; margin-bottom: 52px; }
.post-thumb { flex: 0 0 230px; }
.post-thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card h2 { font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.post-card p { font-size: 15px; color: var(--muted); margin: 10px 0 0; }
time { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* articles (posts, about) — same running-text register as the project pages:
   one face, 16px, 720px measure */
.article { max-width: 772px; margin: 0 auto; padding: 0 26px; }
.article .section-title { margin-top: 5vh; }
.post-formatting { font-size: 16px; line-height: 1.6; }
.post-formatting img { margin: 26px auto; }
.post-formatting iframe { max-width: 100%; }
.post-formatting a { text-decoration: underline; text-underline-offset: 3px; }
/* same register as the project pages' .strip-end: Previous / grid / Next */
.post-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 8vh;
  font-family: var(--sans); font-size: 16px; color: var(--ink);
}
.post-nav a { color: inherit; text-decoration: none; opacity: .85; }
.post-nav a:hover { opacity: 1; }
.post-nav .gridlink { line-height: 0; }
.post-nav .gridlink svg { width: 16px; height: 16px; }
.video-embed { position: relative; padding-bottom: 56.25%; margin: 26px 0; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* home */
.home-content { max-width: 1100px; margin: 4vh auto 0; padding: 0 34px; }
.home-content img { margin: 0 auto; }
/* home: four pictures as the way in, two up on desktop, one on mobile */
.home-picks {
  max-width: 1360px; margin: 5vh auto 8vh; padding: 0 34px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 26px;
}
.home-picks .grid-title a { color: inherit; text-decoration: none; }
@media (max-width: 700px) {
  .home-picks { grid-template-columns: 1fr; gap: 26px; padding: 0 18px; margin: 3vh auto 6vh; }
}

/* footer — mirrors the essay footer */
.site-footer {
  text-align: center; font-family: var(--sans); font-size: 12px; color: var(--muted);
  letter-spacing: .12em; text-transform: uppercase; padding: 0 20px 6vh;
}
.site-footer span { display: block; margin-bottom: 10px; }
.footer-nav { display: flex; gap: 22px; justify-content: center; }
.footer-nav a { color: var(--muted); }
.footer-nav a:hover { color: var(--ink); opacity: 1; }

/* mobile */
@media (max-width: 700px) {
  .portfolio-grid { display: none; }
  .portfolio-flat { display: block; max-width: 560px; margin: 0 auto; padding: 0 18px; }
  .portfolio-flat .grid-item { margin-bottom: 34px; }
}
@media (max-width: 640px) {
  /* name + nav were fighting for one row and wrapping to 3 lines total;
     stack them into two clean rows instead of hiding nav behind a
     hamburger (removed site-wide 2026-07-11, only 3 links here anyway) */
  .topbar { padding: 16px 18px; font-size: 11px; letter-spacing: .12em;
            flex-direction: column; align-items: flex-start; gap: 10px; }
  .tb-nav { gap: 14px; justify-content: flex-start; }
  .section-title { margin: 5vh auto 4vh; }
  .post-card { flex-direction: column; gap: 14px; }
  .post-thumb { flex: none; }
  .post-formatting { font-size: 15px; }
  .home-content { padding: 0 18px; }
}
