:root {
  --bg: #ffffff;
  --text: #1f2a3a;
  --muted: #5b6577;
  --primary: #1565c0;
  --border: #e2e8f1;
  --max-width: 1140px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
}

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

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.site-title a {
  color: #000;
}

.site-title a:hover,
.site-title a:focus {
  text-decoration: none;
  color: #000;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.main-nav a {
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  color: #000;
  font-weight: 500;
}

.main-nav a[aria-current="page"] {
  color: #fff;
  background: var(--primary);
}

.main-nav a:hover,
.main-nav a:focus {
  background: #f3f6fb;
  color: #000;
  text-decoration: none;
}

.main-nav a[aria-current="page"]:hover,
.main-nav a[aria-current="page"]:focus {
  background: var(--primary);
  color: #fff;
}

.hero {
  width: 100%;
  margin: 0;
  padding: 1.4rem 1rem;
  display: flex;
  justify-content: center;
  background: #fff;
}

.hero-card {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 20, 35, 0.22) 0%, rgba(15, 20, 35, 0.5) 100%);
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
}

.hero-content {
  position: absolute;
  top: 67%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 100%;
  max-width: 960px;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
}

.hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.hero p {
  margin: 0;
  font-size: 1.12rem;
}

.nowrap {
  white-space: nowrap;
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.4rem 1rem 2.2rem;
}

.intro {
  padding: 0;
  display: grid;
  gap: 2rem;
  align-items: center;
  grid-template-columns: 1.6fr 1fr;
}

.intro p {
  margin: 0 0 1.2rem;
}

.site-footer {
  margin-top: 1.8rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-wrap p {
  margin: 0.35rem 0;
}

.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
}

.btn:hover,
.btn:focus {
  text-decoration: none;
  filter: brightness(0.95);
}

@media (max-width: 800px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .intro {
    grid-template-columns: 1fr;
  }
}

.page-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}

.page-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.2;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

.people-grid {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.3rem;
}

.person-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  text-align: center;
}

.person-card img {
  width: 170px;
  height: 170px;
  margin: 0 auto 0.8rem;
  object-fit: cover;
  border-radius: 50%;
}

.person-card h2 {
  margin: 0;
  font-size: 1.12rem;
}

.person-role {
  margin: 0.25rem 0 0;
  color: var(--muted);
  min-height: 2.9em;
}

.person-links {
  margin-top: 0.65rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.person-links a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.person-links a:hover,
.person-links a:focus {
  text-decoration: none;
  color: var(--primary);
  border-color: var(--primary);
}

.project-grid {
  margin-top: 1.6rem;
  display: grid;
  gap: 1rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  background: #fff;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.2rem;
  align-items: start;
}

.project-media {
  width: 200px;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.project-body {
  display: flex;
  flex-direction: column;
}

.project-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0 0 0.6rem;
  flex: 1;
}

.project-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-links a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-links a:hover,
.project-links a:focus {
  text-decoration: none;
  color: var(--primary);
  border-color: var(--primary);
}

@media (max-width: 600px) {
  .project-card {
    grid-template-columns: 1fr;
  }

  .project-media {
    width: 100%;
    height: 190px;
  }
}

.year-block {
  margin-top: 1.4rem;
}

.year-block h2 {
  margin: 0 0 0.7rem;
  font-size: 1.22rem;
}

.pub-list {
  margin: 0;
  padding-left: 1.1rem;
}

.pub-list li {
  margin-bottom: 0.7rem;
}

.work-hero {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1rem;
  background: #f8fbff;
}

.work-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: top;
}

.work-hero-text {
  padding: 1rem;
}

.opportunities {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.opportunity {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.opportunity h2 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.wide-photo {
  margin-top: 1.2rem;
  height: 320px;
  border-radius: 14px;
  background: url("assets/media/glasgow_uni.jpg") center/cover no-repeat;
}

.resource-block {
  margin-top: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  background: #fff;
}

.resource-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.resource-block h3 {
  margin: 1rem 0 0.3rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.resource-block ul {
  margin: 0;
  padding-left: 1.2rem;
}

.resource-block li {
  margin-bottom: 0.45rem;
}
