/* Academic aesthetic inspired by diwlevin.com — minimal, professional, with character */
:root {
  --bg: #fcfcfb;
  --bg-card: #fff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --accent: #2c5282;
  --accent-light: #4a7ab8;
  --accent-warm: #8b6914;
  --border: #e0ddd8;
  --award-bg: #e8f0f8;
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem;
}

/* Subtle grid background — simulation/craft theme */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.25;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Header — blue bar with white text, full viewport width */
.site-header {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 2.5rem;
  padding: 1rem 1.75rem;
  background: #2c7bb6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-header .nav {
  max-width: 680px;
  margin: 0 auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.nav a {
  color: #fff;
  position: relative;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.nav a:hover {
  color: rgba(255, 255, 255, 0.95);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width 0.2s ease;
}

.nav a:hover::after,
.nav a:focus::after {
  width: 100%;
}

.nav-home {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Main */
.main {
  min-height: 50vh;
}

h1, h2, h3 {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: 2rem; margin-top: 0; line-height: 1.2; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

/* Recruiting banner */
.recruiting-banner {
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0;
}

.recruiting-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.recruiting-banner a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.recruiting-sep {
  opacity: 0.7;
}

/* LLM disclaimer banner — set llm_disclaimer: false in site.yaml to remove */
.llm-disclaimer {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Hero — full-width so background blends to screen edges */
.hero {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 3rem;
  padding: 2rem 1.75rem 2rem;
  min-height: 180px;
  overflow: hidden;
}

.hero-teaser {
  position: absolute;
  inset: 0;
  background-image: var(--teaser-url);
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  z-index: 0;
}

.hero-teaser::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 0%, transparent 55%, var(--bg) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 0.5rem;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.affiliations {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.affiliations span {
  display: inline-block;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin: 1rem 0 0 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.hero-contact-sep {
  color: var(--text-muted);
  font-weight: 400;
}

.hero-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  transition: color 0.2s ease, transform 0.15s ease;
}

.hero-contact-link:hover {
  color: var(--accent-light);
}

.hero-contact-link:hover .hero-icon {
  transform: scale(1.08);
}

.hero-icon {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.hero-icon-bluesky {
  width: 1.15em;
  height: 1.15em;
}

/* About page photo */
.about-photo {
  float: right;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0 0 1.5rem 1.5rem;
  box-shadow: 0 2px 8px var(--shadow);
}

@media (max-width: 480px) {
  .about-photo,
  .about-preview-photo {
    float: none;
    display: block;
    margin: 0 auto 1.5rem;
  }

  .about-preview-photo {
    margin-bottom: 1rem;
  }

  .pub-card,
  .pub-full {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    height: 120px;
  }

  .pub-full .pub-thumb {
    width: 100%;
    height: 140px;
  }
}

/* Latest section */
.latest {
  margin-bottom: 2.5rem;
}

.latest h2,
.about-preview h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.pub-card {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 4px;
  border-left: 3px solid transparent;
  box-shadow: 0 1px 3px var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pub-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 79px;
  border-radius: 4px;
  overflow: hidden;
  display: block;
}

.pub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-card-content {
  flex: 1;
  min-width: 0;
}

.pub-card:hover {
  border-left-color: var(--accent);
  box-shadow: 0 2px 8px var(--shadow-hover);
}

.pub-card:last-of-type {
  margin-bottom: 1.25rem;
}

.pub-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.pub-title a {
  color: var(--text);
}

.pub-title a:hover {
  color: var(--accent);
}

.award-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2em 0.6em;
  margin-left: 0.5em;
  background: var(--award-bg);
  color: var(--accent);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

/* About preview */
.about-preview {
  margin-bottom: 2rem;
}

.about-preview-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  float: right;
  margin: 0 0 1rem 1rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.about-preview p {
  font-size: 1rem;
  line-height: 1.7;
}

/* Research page */
.year-group {
  margin-bottom: 2.5rem;
}

.year-group h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
}

.pub-full {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 4px;
  border-left: 3px solid transparent;
  box-shadow: 0 1px 3px var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.pub-full .pub-thumb {
  width: 160px;
  height: 90px;
}

.pub-full-content {
  flex: 1;
  min-width: 0;
}

.pub-full:hover {
  border-left-color: var(--accent);
  box-shadow: 0 2px 8px var(--shadow-hover);
}

.pub-full .pub-title {
  font-size: 1.05rem;
}

.pub-authors, .pub-venue {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}

.pub-links {
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

.pub-links a {
  margin-right: 1.25rem;
  font-weight: 500;
}

.pub-links a:hover {
  text-decoration: underline;
}

/* People */
.people-grid {
  display: grid;
  gap: 1.5rem;
}

.person-card {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 4px;
  border-left: 3px solid var(--border);
  box-shadow: 0 1px 3px var(--shadow);
  transition: border-color 0.2s ease;
}

.person-card:hover {
  border-left-color: var(--accent);
}

.person-card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

.person-role {
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
}

.person-research, .person-note, .person-year {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Teaching */
.teaching-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow);
}

.teaching-table th,
.teaching-table td {
  padding: 0.75rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.teaching-table tr:last-child td {
  border-bottom: none;
}

.teaching-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg);
}

.teaching-table tr:hover td {
  background: rgba(44, 82, 130, 0.03);
}

.teaching-links {
  font-size: 0.9rem;
}

.teaching-links a {
  margin-right: 0.75rem;
}

.teaching-links a:last-child {
  margin-right: 0;
}

/* About page */
.about-content h2 {
  font-size: 1.1rem;
  margin-top: 2rem;
}

.about-content ul {
  padding-left: 1.5rem;
}

/* Footer */
.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.site-footer p {
  font-family: "Source Sans 3", sans-serif;
  font-style: italic;
  font-weight: 500;
}
