/* Trevor Vaughn — personal site (GitHub Pages) */

:root {
  --bg: #f6f3ee;
  --bg-elevated: #fffcf7;
  --text: #1b1917;
  --text-muted: #5c5854;
  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --border: #e0dcd4;
  --nav-h: 3.25rem;
  --radius: 12px;
  --max: min(96vw, 1440px);
  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --font-sans: "Figtree", system-ui, sans-serif;
  --font-serif: "Fraunces", "Georgia", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      ellipse 120% 80% at 50% -20%,
      rgba(15, 118, 110, 0.08),
      transparent 50%
    ),
    radial-gradient(
      ellipse 80% 50% at 100% 100%,
      rgba(180, 83, 9, 0.05),
      transparent 45%
    );
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Top navigation */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  min-height: var(--nav-h);
}

.nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 2rem;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.15rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent-soft);
}

/* Hero / header — text left, portrait right */

.site-header {
  padding-top: 1.35rem;
  padding-bottom: 1.25rem;
}

.header-inner {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(1.25rem, 4vw, 3.5rem);
}

.avatar {
  width: clamp(140px, 24vw, 260px);
  height: clamp(140px, 24vw, 260px);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-left: auto;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 4px 24px rgba(27, 25, 23, 0.07);
}

.header-text {
  min-width: 0;
  flex: 1 1 0;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0.4;
  line-height: 1.12;
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.lede {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.external-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.external-inline a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.email-obfuscated {
  color: var(--text-muted);
  font-weight: 500;
}

.external-inline a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Pages */

main.layout-main {
  padding-bottom: 2.25rem;
}

.page {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

.page.is-active {
  display: flex;
}

.section {
  margin-bottom: 0;
  padding: 1.1rem clamp(1rem, 2vw, 2rem);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.section--solo {
  margin-bottom: 0;
}

h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40, "WONK" 0.3;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

h2::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #b45309));
  border-radius: 2px;
  flex-shrink: 0;
}

.section-lead {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

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

.section p {
  margin: 0 0 0.65rem;
}

/* Publications */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-item {
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--border);
  display: grid;
  gap: 0.3rem;
}

.pub-item:first-child {
  padding-top: 0;
}

.pub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pub-title {
  font-weight: 600;
  font-size: 1.02rem;
  display: block;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.pub-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pub-links a {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.2rem 0.65rem;
  background: var(--accent-soft);
  border-radius: 6px;
}

.pub-links a:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent-hover);
}

/* Short notes (PDFs) */

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes-list li {
  border-bottom: 1px solid var(--border);
}

.notes-list li:last-child {
  border-bottom: none;
}

.note-link {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  margin: 0 -0.25rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  transition: background 0.12s ease;
}

.note-link:hover {
  background: rgba(15, 118, 110, 0.06);
}

.note-link:hover .note-title {
  color: var(--accent);
}

.note-title {
  font-weight: 600;
  transition: color 0.15s ease;
}

.note-title::after {
  content: " · PDF";
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.note-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Personal */

.personal-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text);
}

.personal-list li {
  margin-bottom: 0.45rem;
}

.personal-list li:last-child {
  margin-bottom: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .header-inner {
    align-items: center;
  }
}

@media (max-width: 520px) {
  .header-inner {
    align-items: center;
    gap: 1rem;
  }

  .avatar {
    width: 120px;
    height: 120px;
  }

  .site-title {
    font-size: 1.65rem;
  }
}
