/* Simon J. Puglisi — personal site.
   Left: name, titles, photo. Right: section links, then the selected section.
   Sections are shown one at a time using the URL fragment (#contact etc.). No JavaScript. */

@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --bg: #fff;
  --text: #222;
  --muted: #777;
  --rule: #e6e6e6;
  --link: #d2042d;         /* cherry red */
  --link-hover: #1e90ff;   /* dodger blue */
  --font: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --photo: 430px;   /* left column: photo and links */
}

* { box-sizing: border-box; }

html, body { background: var(--bg); }

body {
  margin: 0 auto;
  max-width: 62rem;
  padding: 3.5rem 2rem 6rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.7;
}

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

/* ---- Left column: name, titles, photo ---- */
h1 {
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
}
.roles {
  margin: 0.35rem 0 1.25rem;
  font-size: 0.8rem;
  white-space: nowrap;
  line-height: 1.5;
  color: var(--muted);
}

/* ---- Two columns ---- */
.layout {
  display: grid;
  grid-template-columns: var(--photo) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Right column: the links, then the selected section ---- */
.content { max-width: 32rem; padding-top: 0.55rem; }   /* links line up with the name */

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  margin-bottom: 1.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
nav a { color: var(--muted); }
nav a:hover { color: var(--text); text-decoration: none; }

/* ---- One section at a time ---- */
section { display: none; }
section:target { display: block; }
/* nothing selected → show About */
main:not(:has(section:target)) #about { display: block; }
/* clicking a tab jumps to its #id; this keeps the page at the very top instead of scrolling to the section */
section { scroll-margin-top: 100vh; }

/* highlight the current link (add a line here when adding a section) */
body:has(#about:target) nav a[href="#about"],
body:has(#contact:target) nav a[href="#contact"],
body:has(#publications:target) nav a[href="#publications"],
body:has(#activities:target) nav a[href="#activities"],
body:has(#group:target) nav a[href="#group"],
body:has(#life:target) nav a[href="#life"],
body:not(:has(section:target)) nav a[href="#about"] { color: var(--text); }

/* ---- Content ---- */
section > p:first-child { margin-top: 0; }

h2 {
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2rem 0 0.5rem;
}
section > h2:first-child { margin-top: 0.3rem; }
h2 + p { margin-top: 0; }   /* a one-line paragraph sits as close under its heading as a list does */

ul { list-style: none; padding: 0; margin: 0 0 1rem; }
li { margin: 0.4rem 0; }

dl { display: grid; grid-template-columns: 5rem 1fr; gap: 0.6rem 1rem; margin: 0; }
dt { font-family: var(--font); font-size: 0.75rem; letter-spacing: 0.08em;
     text-transform: uppercase; color: var(--muted); padding-top: 0.3rem; }
dd { margin: 0; }

.aside { color: var(--muted); font-size: 0.95rem; margin-top: 0.4rem; }   /* a grey note just under the list it belongs to */

/* publications: title on its own line, then authors, then venue + links */
.pubs li { margin: 0 0 1.4rem; }
.pubs .title, .pubs .authors, .pubs .venue { display: block; }
.pubs .authors, .pubs .venue { color: var(--muted); font-size: 0.88rem; }
.pubs .venue { display: inline; }
.pubs a { font-size: 0.85rem; margin-left: 0.4rem; }
.back { margin-top: 2.5rem; }   /* links to older photos at the bottom of Life */
.nw { white-space: nowrap; }   /* keep a short phrase on one line, e.g. "k-mer", "SEA 2018 (L'Aquila)" */

/* ---- Phones: stack everything ---- */
@media (max-width: 700px) {
  body { padding: 2rem 1.25rem 4rem; font-size: 0.9rem; }
  .layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { max-width: 360px; }
  .roles { white-space: normal; }
  section { scroll-margin-top: 6.5rem; }   /* on phones, scroll to the section but keep the tab links in view */
  dl { grid-template-columns: 1fr; gap: 0.1rem; }
  dd { margin-bottom: 0.8rem; }
}
