/* =========================================
   Walter Stover — Personal Academic Website
   Shared Stylesheet
   ========================================= */

/* ---- Reset & Base ---- */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #f8f6f1;
  --text:      #1c1c1a;
  --muted:     #6b6760;
  --accent:    #5a7d8a;   /* muted teal */
  --accent-hv: #3d5f6b;
  --border:    #dedad3;
  --max-w:     680px;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 350;
  line-height: 1.75;
  padding: 0 1.25rem;
}

/* ---- Layout ---- */

.site-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ---- Navigation ---- */

header {
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.site-name {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.site-name:hover {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

nav a {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

/* ---- Main Content ---- */

main {
  padding: 3.5rem 0 5rem;
}

/* ---- Typography ---- */

h1 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

h2 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  margin-top: 3rem;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.15rem;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hv);
}

/* ---- Home Page ---- */

.tagline {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2.25rem;
  letter-spacing: 0.01em;
}

.bio {
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.interests {
  margin-bottom: 3rem;
}

.interests ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.interests li {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.link-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.link-row a {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

/* ---- Publications ---- */

.pub-list {
  list-style: none;
}

.pub-list li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-list li:first-child {
  border-top: 1px solid var(--border);
}

.pub-title {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.45;
}

.pub-meta {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.5;
}

.pub-status {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.05rem 0.4rem;
  border-radius: 2px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ---- CV ---- */

.cv-section {
  margin-bottom: 2.5rem;
}

.cv-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.cv-entry:first-of-type {
  border-top: 1px solid var(--border);
}

.cv-entry-main {
  grid-column: 1;
}

.cv-entry-date {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}

.cv-org {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
}

.cv-detail {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.cv-detail ul {
  margin: 0.25rem 0 0 1.1rem;
}

.cv-detail li {
  margin-bottom: 0.2rem;
}

.cv-conf {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}

.cv-conf:first-of-type {
  border-top: 1px solid var(--border);
}

.cv-conf-title {
  font-style: italic;
}

.cv-conf-meta {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.cv-download-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cv-updated {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.cv-download {
  display: inline-block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.88rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.cv-download:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---- Responsive ---- */

@media (max-width: 560px) {
  html {
    font-size: 16px;
  }

  header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.75rem 0 1.5rem;
  }

  nav {
    gap: 1.1rem;
  }

  main {
    padding: 2.5rem 0 4rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  .cv-entry {
    grid-template-columns: 1fr;
  }

  .cv-entry-date {
    grid-row: 1;
    padding-top: 0;
  }

  .cv-entry-main {
    grid-row: 2;
  }
}
