/* VRiend Lab - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@600;700;800;900&display=swap');

:root {
  --primary-color: #265d7c;   /* Deep blue from logo text */
  --accent-color: #72c8d4;    /* Cyan from logo arm/text */
  --accent-hover: #5ab8c6;
  --text-dark: #214b66;
  --text-light: #6c6e8f;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border-color: #d8deea;
  --secondary-accent: #9a7db9; /* Violet from logo */
  --warm-accent: #ddb188;      /* Warm gradient tone from logo */
  --heading-font: "Nunito Sans", "Avenir Next", "Trebuchet MS", sans-serif;
  --max-width: 1100px;
  --anchor-offset: 4rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

/* Header & Navigation */
header {
  background: linear-gradient(125deg, rgba(27, 52, 76, 0.94), rgba(60, 69, 120, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.logo-icon {
  height: 52px;
  width: auto;
  display: block;
}

.logo-text {
  display: inline-block;
  font-family: var(--heading-font);
  font-size: 1.20rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--accent-color);
  line-height: 1;
}

.logo-vr {
  color: inherit;
}

.logo-text strong {
  display: block;
  font-size: 0.8em;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-top: 0.03em;
  color: inherit;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  font-family: var(--heading-font);
  text-decoration: none;
  color: #e6f5fb;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}

nav a:hover, nav a.active {
  color: #ffffff;
  background-color: rgba(114, 200, 212, 0.22);
}

/* Page Layout */
main {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hero {
  background-image: linear-gradient(rgba(18, 30, 44, 0.00), rgba(18, 30, 44, 0.00)), url("../assets/images/media/GI_Presentation.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  min-height: 320px;
  color: var(--white);
  padding: 3.5rem 2rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
}

.hero-slide-reveal {
  --reveal-x: 0%;
  --hero-clip-path: inset(0 calc(100% - var(--reveal-x)) 0 0);
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  cursor: ew-resize;
}

.hero-slide-reveal.is-dragging {
  touch-action: none;
  cursor: grabbing;
}

.hero-slide-reveal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background-image: linear-gradient(rgba(18, 30, 44, 0.25), rgba(18, 30, 44, 0.40)), url("../assets/images/media/GI_Presentation_3D.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: var(--hero-clip-path);
  z-index: 1;
}

.hero-corner {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  max-width: calc(100% - 2.5rem);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.50));
  z-index: 2;
}

.hero-logo {
  width: min(182px, 27vw);
  height: auto;
  display: block;
  object-fit: cover; /* Keeps image proportions correct */
  clip-path: circle(50%); /* Clips the image into a perfect circle */
}

.hero-actions {
  position: static;
  max-width: min(300px, 72vw);
}

.hero-actions .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero p.tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  font-style: italic;
  margin-bottom: 1rem;
}

.hero p.affiliation {
  font-size: 0.95rem;
  opacity: 0.8;
}

section {
  margin-bottom: 3rem;
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.35fr);
  gap: 1.25rem;
  align-items: stretch;
}

.contact-card-copy {
  min-width: 0;
}

.contact-card-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
  height: 100%;
}

.contact-card-image {
  width: 100%;
  max-width: 100%;
  min-height: 320px;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 24px rgba(33, 75, 102, 0.12);
}

h2 {
  font-family: var(--heading-font);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1.75rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-family: var(--heading-font);
  font-weight: 800;
  letter-spacing: 0.005em;
}

p {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

p.note {
  font-size: 0.85rem;
  font-style: italic;
}

/* Links & Buttons */
a {
  color: var(--accent-color);
}

.btn {
  font-family: var(--heading-font);
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--accent-hover);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-inactive,
.btn-inactive:hover {
  background-color: #e5e9f1 !important;
  color: #7d8897 !important;
  border-color: #c7cfdb !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Cards & Grids */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  
  gap: 1.5rem;
  margin-top: 1rem;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--white);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

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

.publication-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0.0rem 0.9rem;
  align-items: start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #ffffff;
}

/* .member-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: minmax(60px, 1fr);
  grid-auto-rows: auto;
  gap: 0.0rem 0.9rem;
  align-items: flex-start;
  padding: 1rem;
  position: relative;
} */

.member-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0.0rem 0.9rem;
  align-items: start;
  padding: 1rem;
  position: relative;
  height: 100%;
}

.member-grid {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.publication-card[id],
.member-card[id] {
  scroll-margin-top: var(--anchor-offset);
}

.member-grid .member-card {
  align-self: start;
}

.member-grid .member-card:only-child {
  grid-column: 1 / -1;
}

.member-photo, .publication-thumb {
  grid-column: 1;
  grid-row: 1 / span 5;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  flex: 0 0 auto;
}

.member-content h3 {
  grid-column: 2;
  margin-bottom: 0.2rem;
  padding-right: 6.8rem;
}

.member-content p {
  margin-bottom: 0.3rem;
  font-size: 0.94rem;
}

.member-role,
.member-pronouns,
.member-interests {
  grid-column: 2;
  display: block;
}

.member-toggle-btn {
  grid-column: 1;
  grid-row: 1;
  margin-top: 100px;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--accent-color);
  border-radius: 999px;
  background-color: var(--accent-color);
  color: var(--white);
  font-family: var(--heading-font);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.2s;
}

.member-toggle-btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
}

.member-toggle-btn:focus-visible {
  outline: 2px solid rgba(114, 200, 212, 0.85);
  outline-offset: 2px;
}

.member-bio,
.member-extra,
.member-extra-link {
  grid-column: 1 / -1;
}

.member-extra,
.member-extra-link {
  display: none;
}

.member-bio {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height 320ms ease, opacity 240ms ease, transform 240ms ease, margin-top 240ms ease;
}

.member-card.is-expanded .member-bio {
  max-height: 40rem;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.35rem;
}

.member-card.is-expanded .member-extra {
  display: block;
  margin-top: 0.2rem;
}

.member-card.is-expanded .member-extra-link {
  display: inline-block;
  margin-top: 0.2rem;
}

/* Lists */
ul.styled-list {
  list-style-type: square;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

ul.styled-list li {
  margin-bottom: 0.5rem;
}

ul.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.contact-links li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}

ul.contact-links li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-dark);
}

/* Announcements / News Feed */
.news-item {
  border-left: 4px solid var(--accent-color);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.news-date {
  font-family: var(--heading-font);
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Footer */
footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 4rem;
}

.footer-dept-link {
  color: inherit;
  text-decoration: underline;
}

.footer-dept-link:hover {
  color: var(--accent-color);
}

.footer-tmu-link {
  color: inherit;
  text-decoration: underline;
}

.footer-tmu-link:hover {
  color: var(--accent-color);
}

.footer-logo-link {
  display: inline-block;
}

.footer-logo {
  display: block;
  width: min(220px, 46vw);
  height: auto;
  margin: 0.8rem auto 0;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  margin: 0 0.75rem;
  color: var(--text-light);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-color);
}

/* Responsive Nav Medium + Mobile */
@media (max-width: 1080px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }
  .logo {
    align-self: center;
  }
  nav {
    width: 100%;
  }
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
  }
  nav a {
    padding: 0.16rem 0.32rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0.85rem 1rem;
  }
  .logo-icon {
    height: 46px;
  }
  .logo-text {
    font-size: 1.35rem;
  }
  .hero {
    min-height: 260px;
    padding: 2rem 1.25rem;
  }
  .hero-corner {
    right: 1rem;
    bottom: 0.9rem;
    gap: 0.45rem;
    max-width: calc(100% - 2rem);
  }
  .hero-logo {
    width: min(126px, 35vw);
  }
  .hero-actions {
    max-width: min(220px, 68vw);
  }
  .hero-actions .btn {
    font-size: 0.86rem;
    padding: 0.48rem 0.75rem;
    letter-spacing: 0;
  }
  .member-grid {
    grid-template-columns: 1fr;
  }
 
  .contact-card-body {
    grid-template-columns: 1fr;
  }
  .contact-card {
    grid-template-columns: 1fr;
  }
  .contact-card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-card-image {
    min-height: 180px;
    aspect-ratio: 4 / 5;
  }
  .publication-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .publication-thumb {
    max-width: 84px;
  }
  nav ul {
    gap: 0.65rem 0.85rem;
  }
  .footer-logo {
    width: min(170px, 56vw);
  }
}

@media (max-width: 425px) {
  .nav-container {
    padding: 0.85rem 1rem;
  }
  .logo-icon {
    height: 46px;
  }
  .logo-text {
    font-size: 1.35rem;
  }
  .hero {
    min-height: 260px;
    padding: 2rem 1.25rem;
  }
  .hero-corner {
    right: 1rem;
    bottom: 0.9rem;
    gap: 0.45rem;
    max-width: calc(100% - 2rem);
  }
  .hero-logo {
    width: min(126px, 35vw);
  }
  .hero-actions {
    max-width: min(220px, 68vw);
  }
  .hero-actions .btn {
    font-size: 0.86rem;
    padding: 0.48rem 0.75rem;
    letter-spacing: 0;
  }

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

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

  .member-card {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }

  .publication-card .btn {
    display: block;
    width: auto;
    margin: 0.25rem 0 0 0;
  }

  .member-photo, .publication-thumb {
    justify-self: center;
  }
 
  .contact-card-body {
    grid-template-columns: 1fr;
    
  }
  .contact-card {
    grid-template-columns: 1fr;
  }
  .contact-card-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-card-image {
    min-height: 180px;
    aspect-ratio: 4 / 5;
  }
  .publication-card {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
  }
  .publication-thumb {
    max-width: 84px;
  }
  nav ul {
    gap: 0.65rem 0.85rem;
  }
  .footer-logo {
    width: min(170px, 56vw);
  }
}
