:root {
  --fg: #111;
  --bg: #fff;
  --gap: 16px;
  --muted: #666;
  --rule: #ddd;
  --frame: rgb(0 0 0 / 0.1);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.5;
}

a { color: inherit; }

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

.nav, main, .footer {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 32px 24px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.nav > :first-child { grid-column: 2; }
.nav > :last-child { justify-self: end; }

.brand { display: grid; justify-items: center; gap: 8px; }
.logo { height: 80px; width: auto; }

.tagline {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Small spaced capitals, matching the About page's section heading. */
.nav-links {
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links a { text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

main { padding-bottom: 64px; }

.footer {
  padding-block: 24px 40px;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer p { margin: 0; }

/* The URL hash picks the view: #slug shows that work, #about the bio, #contact the form, no hash the grid. */
.view { display: none; scroll-margin-top: 100vh; }
.view:target { display: block; }
main:has(.view:target) .grid { display: none; }

/* Sizing mirrors giselleharrington.com: 1200px column, 3 columns, 3% gutters. Images keep their own proportions. */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: min(56px, 5vw) min(36px, 3vw);
}

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .nav { grid-template-columns: auto 1fr; gap: 16px; }
  .nav > :first-child { grid-column: auto; }
  .brand { justify-items: start; }
  .logo { height: 56px; }
  .nav-links { gap: 12px; }
}

.tile {
  display: block;
  text-decoration: none;
}

.tile img {
  width: 100%;
  height: auto;
  transition: opacity 0.2s ease;
}

/* A hairline frame keeps white edges in the art from melting into the page. */
.tile img, .detail-img { outline: 1px solid var(--frame); outline-offset: -1px; }

.caption { display: grid; gap: 2px; margin-top: 10px; }
.caption .medium { font-size: 0.85rem; color: var(--muted); }

.tile:hover img { opacity: 0.85; }
.tile:hover .title { text-decoration: underline; text-underline-offset: 3px; }

.tile:focus-visible { outline: 3px solid var(--fg); outline-offset: 4px; }

.column { max-width: 800px; margin-inline: auto; }
.column h1 { margin: 16px 0 8px; font-weight: normal; }
.about { max-width: 640px; }
.about .lead { font-size: 1.15rem; line-height: 1.7; }

.about h2 {
  margin: 40px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.education { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.education li { display: grid; gap: 2px; }
.education .school { font-weight: bold; }
.education .detail { color: #444; font-size: 0.95rem; }

.contact-form { display: grid; gap: 16px; max-width: 560px; }
.contact-form label { display: grid; gap: 4px; }

.contact-form input,
.contact-form textarea,
.contact-form button {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--fg);
  border-radius: 0;
}

.contact-form textarea { resize: vertical; }

.contact-form button {
  justify-self: start;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
}

.contact-form button:hover { opacity: 0.85; }

/* Honeypot: hidden from people, filled in by bots, and Netlify drops those submissions. */
.hidden { display: none; }

/* Sized to the image itself (not a letterboxed box) so the frame hugs the art. */
.detail-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
}
