/* ── Reset & variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rmit-red:    #e61e2a;
  --rmit-dark:   #1a1a1a;
  --rmit-mid:    #3d3d3d;
  --rmit-light:  #f5f5f5;
  --rmit-white:  #ffffff;
  --border:      #e0e0e0;
  --max-width:   1100px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--rmit-dark);
  background: var(--rmit-white);
  line-height: 1.6;
}

/* ── Top bar ── */
.top-bar {
  background: var(--rmit-red);
  height: 6px;
}

/* ── Site header ── */
.site-header {
  background: var(--rmit-dark);
  color: var(--rmit-white);
  padding: 1.75rem 1.5rem;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.rmit-wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--rmit-red);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.header-divider {
  width: 2px;
  height: 3rem;
  background: rgba(255, 255, 255, 0.25);
}

.header-text .site-title {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rmit-white);
  text-decoration: none;
}

.header-text .site-title:hover {
  text-decoration: underline;
}

.header-text p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.2rem;
}

.header-text a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.header-text a:hover {
  color: var(--rmit-white);
  text-decoration: underline;
}

/* ── Hero ── */
.hero {
  background: var(--rmit-light);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero h2 span {
  color: var(--rmit-red);
}

.hero p {
  font-size: 1.05rem;
  color: var(--rmit-mid);
  margin-bottom: 0.75rem;
}

.hero a {
  color: var(--rmit-red);
  font-weight: 600;
  text-decoration: none;
}

.hero a:hover {
  text-decoration: underline;
}

/* ── Research areas section ── */
.research-section {
  padding: 4rem 1.5rem;
}

.research-section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-heading h3 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rmit-mid);
}

.section-heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--rmit-red);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ── Cards ── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.card-accent {
  height: 6px;
  background: var(--rmit-red);
}

.card-body {
  padding: 1.75rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  line-height: 1;
}

.card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--rmit-mid);
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--rmit-red);
}

.card-link::after {
  content: "→";
}

/* ── Generic page layout ── */
.page-content {
  padding: 3rem 1.5rem;
}

.page-inner {
  max-width: 860px;
  margin: 0 auto;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 4px solid var(--rmit-red);
}

.page-inner h2 { margin: 1.5rem 0 0.5rem; }
.page-inner p  { margin-bottom: 1rem; color: var(--rmit-mid); }

/* ── Site footer ── */
.site-footer {
  background: var(--rmit-dark);
  color: rgba(255, 255, 255, 0.55);
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  text-align: center;
}

.site-footer p + p {
  margin-top: 0.4rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--rmit-white);
  text-decoration: underline;
}

/* ── Area hero ── */
.area-hero .area-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

/* ── Project list ── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--rmit-red);
  border-radius: 6px;
  background: var(--rmit-white);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.project-card:hover {
  background: var(--rmit-light);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.project-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.project-card-title a {
  color: inherit;
  text-decoration: none;
}

.project-card-title a:hover {
  color: var(--rmit-red);
}

.project-card-people {
  font-size: 0.85rem;
  color: var(--rmit-mid);
  margin-bottom: 0.2rem;
}

.project-card-people:last-of-type {
  margin-bottom: 0.5rem;
}

.project-card-people a {
  color: var(--rmit-mid);
  text-decoration: none;
  font-weight: 600;
}

.project-card-people a:hover {
  color: var(--rmit-red);
}

.project-card-label {
  font-weight: 700;
  color: var(--rmit-dark);
}

.project-card-abstract {
  font-size: 0.88rem;
  color: var(--rmit-mid);
  line-height: 1.55;
  margin: 0;
}

/* project detail page */
.project-meta {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.project-meta-people {
  font-size: 0.95rem;
  color: var(--rmit-mid);
  margin-bottom: 0.75rem;
}

.project-meta-people a {
  color: var(--rmit-mid);
  font-weight: 600;
  text-decoration: none;
}

.project-meta-people a:hover {
  color: var(--rmit-red);
}

.project-meta-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
}

.project-meta-collaborators {
  font-size: 0.88rem;
  color: var(--rmit-mid);
  margin-bottom: 0.4rem;
}

.project-meta-dates {
  font-size: 0.85rem;
  color: var(--rmit-mid);
}

.project-meta-funding {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rmit-mid);
  background: var(--rmit-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.project-abstract {
  margin-bottom: 1.75rem;
}

.project-abstract h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rmit-mid);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0.75rem;
}

.project-abstract p {
  font-size: 0.95rem;
  color: var(--rmit-mid);
  line-height: 1.7;
}

.project-body h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.project-body h2:has(+ h2),
.project-body h2:last-child {
  display: none;
}

.project-body p {
  font-size: 0.95rem;
  color: var(--rmit-mid);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.project-body ul {
  list-style: disc;
  list-style-position: inside;
  padding-left: 0;
  margin: 0 0 0.75rem;
}

.project-body li {
  font-size: 0.95rem;
  color: var(--rmit-mid);
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

/* person → projects */
.person-project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.person-project-list li {
  font-size: 0.9rem;
}

.person-project-list a {
  font-weight: 600;
  color: var(--rmit-dark);
  text-decoration: none;
}

.person-project-list a:hover {
  color: var(--rmit-red);
}

.person-project-list p {
  font-size: 0.85rem;
  color: var(--rmit-mid);
  margin: 0.2rem 0 0;
  line-height: 1.5;
}

/* ── Status badge ── */
.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.status-active {
  background: #dcfce7;
  color: #166534;
}

.status-completed {
  background: #f1f5f9;
  color: #475569;
}

.type-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.type-phd {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Area tags ── */
.project-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.area-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: var(--rmit-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  color: var(--rmit-mid);
}

.area-tag-link {
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.area-tag-link:hover {
  background: #fde8e9;
  border-color: var(--rmit-red);
  color: var(--rmit-red);
}

/* ── Project detail page ── */
.project-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.project-areas-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.project-meta-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.project-summary {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: var(--rmit-mid);
}

.project-body p {
  margin-bottom: 1rem;
  color: var(--rmit-mid);
}

/* ── All-projects page ── */
.projects-group-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rmit-mid);
  margin: 2rem 0 0.75rem;
}

.projects-group-heading:first-of-type { margin-top: 0; }

/* ── Misc ── */
.placeholder {
  color: var(--rmit-mid);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

.back-link {
  margin-top: 2.5rem;
}

.back-link a {
  color: var(--rmit-red);
  text-decoration: none;
  font-weight: 600;
}

.back-link a:hover { text-decoration: underline; }

/* ── People page ── */
.people-group {
  margin-bottom: 3.5rem;
}

.people-group-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rmit-mid);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--rmit-red);
  margin-bottom: 1.75rem;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

/* Portrait card */
.person-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--rmit-white);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.person-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.person-avatar-wrap {
  background: var(--rmit-light);
  display: flex;
  justify-content: center;
  padding: 2rem 1.5rem 1.25rem;
}

.person-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--rmit-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.person-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rmit-red);
  color: var(--rmit-white);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.person-details {
  padding: 1.1rem 1.25rem 1.25rem;
  text-align: center;
}

.person-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.person-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rmit-red);
  margin-bottom: 0.75rem;
}

.person-focus {
  font-size: 0.78rem;
  color: var(--rmit-mid);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.person-bio {
  font-size: 0.82rem;
  color: var(--rmit-mid);
  line-height: 1.55;
  text-align: left;
  margin-bottom: 0.85rem;
}

.person-areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}

.person-area-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--rmit-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--rmit-mid);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.person-area-tag:hover {
  background: #fde8e9;
  border-color: var(--rmit-red);
  color: var(--rmit-red);
}

.person-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.person-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rmit-light);
  color: var(--rmit-mid);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.person-links a:hover {
  background: var(--rmit-red);
  color: var(--rmit-white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Publications page ── */
.pub-year-group {
  margin-bottom: 2.5rem;
}

.pub-year-heading {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--rmit-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--rmit-red);
}

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pub-item {
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
}

.pub-item:hover {
  border-left-color: var(--rmit-red);
}

.pub-authors {
  color: var(--rmit-mid);
}

.pub-title {
  font-weight: 600;
  color: var(--rmit-dark);
  text-decoration: none;
}

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

.pub-venue {
  font-style: italic;
  color: var(--rmit-mid);
}

.pub-detail {
  color: var(--rmit-mid);
}

.pub-doi {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rmit-white);
  background: var(--rmit-mid);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  text-decoration: none;
  vertical-align: middle;
}

.pub-doi:hover {
  background: var(--rmit-red);
}

.pub-note {
  display: block;
  font-size: 0.8rem;
  color: var(--rmit-red);
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Person profile page ── */
.person-profile {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.person-profile-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.person-profile-photo,
.person-profile-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
}

.person-profile-photo {
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.person-profile-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rmit-red);
  color: var(--rmit-white);
  font-size: 3rem;
  font-weight: 700;
}

.person-profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.person-profile-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--rmit-light);
  color: var(--rmit-mid);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.person-profile-links a:hover {
  background: var(--rmit-red);
  color: var(--rmit-white);
}

.person-profile-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.person-profile-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.person-profile-role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rmit-red);
  margin-bottom: 0.1rem;
}

.person-profile-dept {
  font-size: 0.9rem;
  color: var(--rmit-mid);
  margin-bottom: 0.4rem;
}

.person-profile-focus {
  font-size: 0.9rem;
  color: var(--rmit-mid);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.person-profile-label {
  font-style: normal;
  font-weight: 700;
  color: var(--rmit-dark);
}

.person-profile-bio,
.person-profile-section {
  margin-top: 1.75rem;
}

.person-profile-bio h2,
.person-profile-section h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--rmit-mid);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0.85rem;
}

.person-profile-bio p {
  font-size: 0.95rem;
  color: var(--rmit-mid);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

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

.person-profile-list li {
  font-size: 0.9rem;
  color: var(--rmit-mid);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

/* person name link on cards */
.person-name a {
  color: inherit;
  text-decoration: none;
}

.person-name a:hover {
  color: var(--rmit-red);
}

@media (max-width: 640px) {
  .person-profile {
    grid-template-columns: 1fr;
  }
  .person-profile-sidebar {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }
  .person-profile-photo,
  .person-profile-placeholder {
    width: 90px;
    height: 90px;
    font-size: 1.75rem;
    flex-shrink: 0;
  }
}

/* ── Site nav (inside dark header) ── */
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--rmit-white);
  border-bottom-color: var(--rmit-red);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--rmit-white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .header-divider { display: none; }
  .hero h2 { font-size: 1.5rem; }
  .cards { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--rmit-dark);
    z-index: 99;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    padding: 0.8rem 1.5rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .nav-links a:hover,
  .nav-links a.active {
    border-bottom-color: transparent;
    border-left-color: var(--rmit-red);
  }

  .site-header { position: relative; }
}
