/* davidfilippimd.com — one stylesheet for every page.
   Palette: light blue page, dark slate text, turquoise accents (La Jolla Cove).
   No web fonts, no scripts, no images required for layout. */

:root {
  --page: #dcedf8;          /* light blue background */
  --text: #1c2b33;          /* near-black slate, 12:1 on --page */
  --muted: #45585f;         /* 6.4:1 on --page */
  --link: #0a6b68;          /* dark turquoise, 6.1:1 on --page */
  --visited: #5c4a86;       /* dusty violet, the old "visited" idea */
  --accent: #1c9c96;        /* turquoise for rules */
  --rule: #8fd0cb;          /* pale turquoise hairline */
  --heading: #0f4d52;       /* deep teal */
  --panel: #edf5fb;         /* slightly lighter block for figures/tables */
  --focus: #0a4f7a;
  color-scheme: light;
}

html { background: var(--page); }

body {
  margin: 0;
  padding: 1.25rem 1rem 2.5rem;
  background: var(--page);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  max-width: 44rem;
  margin-inline: auto;
}

.sr-only { position: absolute; left: -999px; width: 1px; height: 1px; overflow: hidden; }

/* Skip link for keyboard users */
.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: #fff; color: var(--link); padding: 0.4rem 0.7rem; border: 1px solid var(--accent);
}
.skip:focus { left: 1rem; z-index: 10; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.12em; }
a:visited { color: var(--visited); }
a:hover { color: var(--heading); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: normal;
  color: var(--heading);
  line-height: 1.25;
  margin: 0 0 0.35em;
}
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; margin-top: 1.9em; }
h3 { font-size: 1.12rem; margin-top: 1.5em; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }

hr {
  border: 0; border-top: 1px solid var(--accent);
  margin: 1.5rem 0;
}

/* Header and footer navigation: plain, small, separated by middle dots */
.site-header { padding-bottom: 0.6rem; border-bottom: 1px solid var(--accent); margin-bottom: 1.4rem; }
.site-header .home {
  font-size: 0.95rem; letter-spacing: 0.02em; text-decoration: none; color: var(--heading);
}
.site-header .home:hover { text-decoration: underline; }
nav.site ul { list-style: none; padding: 0; margin: 0.35rem 0 0; font-size: 0.92rem; }
nav.site li { display: inline; margin: 0; }
nav.site li + li::before { content: " \00b7 "; color: var(--accent); }
nav.site a { padding: 0.15rem 0.1rem; display: inline-block; }
nav.site a[aria-current="page"] { color: var(--text); text-decoration: none; }

.site-footer {
  margin-top: 3rem; padding-top: 0.8rem; border-top: 1px solid var(--accent);
  font-size: 0.88rem; color: var(--muted);
}
.site-footer p { margin: 0 0 0.4em; }

/* Homepage */
.intro { font-size: 1.1rem; max-width: 38rem; }
.byline { color: var(--muted); font-size: 0.95rem; margin-top: -0.4em; }

/* The index: a semantic list drawn as a plain table with thin rules */
ol.index { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--accent); }
ol.index li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.35rem 1.1rem;
  align-items: start;
  padding: 0.85rem 0;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
ol.index li:last-child { border-bottom: 1px solid var(--accent); }
ol.index .thumb { display: block; width: 5rem; height: 5rem; line-height: 0; }
ol.index .thumb img {
  width: 5rem; height: 5rem; object-fit: cover; border: 1px solid var(--rule); background: #fff;
}
ol.index .title { font-size: 1.15rem; }
ol.index p { margin: 0.15em 0 0; font-size: 0.98rem; color: var(--text); }

/* Content pages */
main img { max-width: 100%; height: auto; }
figure { margin: 1.4rem 0; }
figure img { border: 1px solid var(--rule); background: #fff; }
figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.35rem; }

.portraits { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 1rem 0 1.5rem; }
.portraits figure { margin: 0; flex: 0 1 12rem; }
.portraits img { width: 100%; max-width: 12rem; height: auto; display: block; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.25rem; margin: 1rem 0 1.5rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; display: block; }

.pubs { list-style: none; padding: 0; }
.pubs li { padding: 0.8rem 0; border-top: 1px solid var(--rule); margin: 0; }
.pubs li:last-child { border-bottom: 1px solid var(--rule); }
.pubs .status { font-size: 0.86rem; color: var(--muted); }
.pubs .cite { display: block; }

.app { display: grid; grid-template-columns: 5rem 1fr; gap: 0.3rem 1.1rem; margin: 1.3rem 0; align-items: start; }
.app img { width: 5rem; height: 5rem; border: 1px solid var(--rule); border-radius: 18%; background: #fff; }
.app h3 { margin-top: 0; }
.app p { margin-bottom: 0.5em; }

.note { background: var(--panel); border: 1px solid var(--rule); padding: 0.7rem 0.9rem; font-size: 0.95rem; }

.links { list-style: none; padding: 0; }
.links li::before { content: "\2192\00a0"; color: var(--accent); }

/* Small screens: thumbnails shrink, nothing else changes */
@media (max-width: 30rem) {
  body { font-size: 1rem; padding-top: 0.9rem; }
  ol.index li { grid-template-columns: 4rem 1fr; gap: 0.3rem 0.8rem; }
  ol.index .thumb, ol.index .thumb img { width: 4rem; height: 4rem; }
  .app { grid-template-columns: 4rem 1fr; }
  .app img { width: 4rem; height: 4rem; }
}

@media print {
  html, body { background: #fff; }
  nav.site, .skip { display: none; }
}

/* Contact form */
form.contact label { font-size: 0.95rem; color: var(--heading); }
form.contact input[type="text"], form.contact input[type="email"], form.contact textarea {
  font: inherit; width: 100%; max-width: 34rem; box-sizing: border-box;
  padding: 0.45rem 0.55rem; border: 1px solid var(--accent); background: #fff; color: var(--text);
}
form.contact button {
  font: inherit; padding: 0.5rem 1.1rem; min-height: 44px;
  background: var(--panel); color: var(--heading); border: 1px solid var(--accent); cursor: pointer;
}
form.contact button:hover { background: #fff; }
form.contact .hp { position: absolute; left: -999px; top: -999px; height: 0; overflow: hidden; }
