/* jplhughes.com — shared stylesheet */

:root {
  --bg: #fdfdfc;
  --bg-alt: #f4f5f3;
  --text: #191c20;
  --text-muted: #5b6470;
  --accent: #0e7490;
  --accent-dark: #155e75;
  --accent-soft: rgba(14, 116, 144, 0.09);
  --grad: linear-gradient(120deg, #0e7490, #4f46e5);
  --border: #e2e4e1;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(25, 28, 32, 0.05), 0 6px 20px rgba(25, 28, 32, 0.06);
  --card-shadow-hover: 0 2px 4px rgba(25, 28, 32, 0.06), 0 12px 32px rgba(25, 28, 32, 0.1);
  --gold-bg: #fdf2d0;
  --gold-text: #815b06;
  --gold-border: #ecd9a0;
  --gig-great: #3563c4;
  --gig-exceptional: #4d8a35;
  --gig-upcoming: #8b9299;
  --max-width: 980px;
  --font-display: "Space Grotesk", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --bg-alt: #171b22;
    --text: #e8eaed;
    --text-muted: #9aa4b1;
    --accent: #4cc2e0;
    --accent-dark: #7fd6ec;
    --accent-soft: rgba(76, 194, 224, 0.12);
    --grad: linear-gradient(120deg, #38b6d8, #818cf8);
    --border: #2a303a;
    --card-bg: #171b22;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --card-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.6);
    --gold-bg: #3a3115;
    --gold-text: #eccd6f;
    --gold-border: #5c4d1e;
    --gig-great: #7aa5f0;
    --gig-exceptional: #8ec46f;
    --gig-upcoming: #767e86;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

a {
  color: var(--accent);
  text-decoration: none;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Header / navigation */

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

.site-header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.site-nav a {
  position: relative;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--accent);
  font-weight: 700;
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.1rem;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

/* Layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.75rem 1.25rem 4.5rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.page-intro {
  color: var(--text-muted);
  max-width: 48rem;
  font-size: 1.05rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 3.25rem 0 1.5rem;
}

.section-title::before {
  content: "";
  width: 6px;
  height: 1.5em;
  border-radius: 4px;
  background: var(--grad);
  flex: none;
}

/* Hero (home) */

.hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 1rem;
}

.hero .portrait img {
  border-radius: 16px;
  box-shadow: var(--card-shadow-hover);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.hero h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 1rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.25rem 0 1.4rem;
}

.chip {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.button-row a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.button-row a:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.button-row svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero .portrait {
    max-width: 260px;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
}

/* Cards (publications, projects, career highlights) */

.card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.6rem;
  align-items: start;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card figure {
  margin: 0;
}

.card figure img {
  border-radius: 10px;
  width: 100%;
  object-fit: cover;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
}

.card h3 a {
  color: inherit;
}

.card h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0 0 0.7rem;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-muted);
  white-space: nowrap;
}

.badge.accent {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent-dark);
}

.badge.gold {
  background: var(--gold-bg);
  border-color: var(--gold-border);
  color: var(--gold-text);
}

.card .authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 0.8rem;
  line-height: 1.6;
}

.card .authors strong {
  color: var(--text);
}

.card p.desc {
  margin: 0 0 0.9rem;
  font-size: 0.97rem;
}

.card .links {
  font-size: 0.93rem;
  font-weight: 600;
  margin: 0;
}

.card .links .sep {
  color: var(--border);
  margin: 0 0.4rem;
  font-weight: 400;
}

@media (max-width: 720px) {
  .card {
    grid-template-columns: 1fr;
  }
  .card figure {
    max-width: 280px;
  }
}

/* Standalone headings inside sections (talks, interviews) */

.entry h3 {
  margin: 1.6rem 0 0.25rem;
  font-size: 1.15rem;
}

.entry .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}

/* Video embeds */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Gig list (music) */

.gig-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 2rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.gig-legend span.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.gig-legend .swatch {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  margin-right: 0.5em;
}

.gig-year {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.25rem 0 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gig-year::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.gig-list li {
  display: flex;
  gap: 0.75rem;
  padding: 0.32rem 0;
}

.gig-list .date {
  flex: none;
  width: 8.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  padding-top: 0.05rem;
}

.gig-great {
  color: var(--gig-great);
  font-weight: 600;
}

.gig-exceptional {
  color: var(--gig-exceptional);
  font-weight: 700;
}

.gig-upcoming {
  color: var(--gig-upcoming);
}

.gig-list .badge {
  font-size: 0.68rem;
  padding: 0.02rem 0.5rem;
  margin-left: 0.4rem;
  vertical-align: 2px;
}

@media (max-width: 560px) {
  .gig-list li {
    flex-direction: column;
    gap: 0;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
  }
  .gig-list .date {
    width: auto;
    font-size: 0.82rem;
  }
}

/* Photo gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.02);
  box-shadow: var(--card-shadow-hover);
}

/* Compact work rows (Other Work / Earlier Work) */

.work-row {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.work-row:last-of-type {
  border-bottom: 0;
}

.work-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.4;
}

.work-row h3 a {
  color: var(--text);
}

.work-row h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.work-authors {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.35rem 0 0;
}

.work-authors strong {
  color: var(--text);
}

.work-desc {
  font-size: 0.94rem;
  margin: 0.4rem 0 0;
}

.work-links {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.45rem 0 0;
}

.work-links .sep {
  color: var(--border);
  margin: 0 0.35rem;
  font-weight: 400;
}

/* Bare link list (More) */

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0 0;
}

.link-list a {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.link-list a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  text-decoration: none;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 1.1rem;
}

.social-links a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.social-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.social-links svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
