/* ============================================================
   joemartin.work — styles
   Plain CSS, no build step. Edit values in :root to reskin.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --bg-alt:    #f5f3ee;
  --text:      #1c1b19;
  --muted:     #5c584f;
  --accent:    #d6472f;   /* warm editorial red */
  --accent-ink:#ffffff;
  --border:    #e4e0d7;
  --maxw:      1040px;
  --radius:    12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #171614;
    --bg-alt: #201e1a;
    --text:   #ece8e0;
    --muted:  #a9a294;
    --accent: #ff6a4d;
    --border: #322e28;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

h1, h2 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}
.hero__banner {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 1rem; }
.hero p  { font-size: 1.12rem; max-width: 60ch; margin: 0 0 1rem; color: var(--text); }
.hero__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: transform .08s ease, opacity .15s ease;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }

/* ---------- Project entries ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}
.entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}
.entry:last-child { border-bottom: none; }

/* alternate the image to the right on even entries */
.entry:nth-child(even) .entry__media { order: 2; }

.entry__media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.entry__body h2 { font-size: 1.9rem; margin: 0 0 0.9rem; }
.entry__body p  { margin: 0 0 1rem; color: var(--muted); }
.entry__body p a { color: var(--text); }

.cta {
  display: inline-block;
  margin-top: 0.4rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.cta:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.footer h2 { font-size: 1.9rem; margin: 0 0 0.5rem; }
.footer p  { color: var(--muted); margin: 0 0 1.25rem; }
.footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.footer__fine { margin-top: 2rem; font-size: 0.85rem; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .entry { grid-template-columns: 1fr; gap: 1.25rem; padding: 2.5rem 0; }
  .entry:nth-child(even) .entry__media { order: 0; }  /* image always on top */
  .hero__banner { height: 160px; }
}
