/* ============================================
   AI V&V Lab — Main Stylesheet
   Branded Identity: "The Verification Lattice"
   KFUPM Green + Saudi Sand/Gold
   ============================================ */

:root {
  /* Core palette */
  --primary: #006747;
  --primary-light: #e8f5f0;
  --primary-dark: #004d35;
  --primary-darker: #003325;
  --primary-rgb: 0, 103, 71;

  /* Sand/Gold accent — Saudi warmth */
  --accent-sand: #c4a35a;
  --accent-sand-light: #f5f0e0;
  --accent-sand-dark: #9e8340;

  /* Deep teal for footer/dark sections */
  --teal-deep: #004040;

  /* Neutrals */
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Shape */
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 32px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font: var(--font-body);
  --max-width: 1100px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Hero gradient */
  --gradient-hero: linear-gradient(160deg, rgba(0,51,37,0.97) 0%, rgba(0,103,71,0.93) 50%, rgba(0,64,64,0.97) 100%);

  /* Brand patterns (data URIs) */
  --pattern-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none' stroke='%23fff' stroke-width='0.75'%3E%3Cpath d='M40 8L72 40L40 72L8 40Z'/%3E%3Cpath d='M0 20Q20 20 20 0'/%3E%3Cpath d='M60 0Q60 20 80 20'/%3E%3Cpath d='M80 60Q60 60 60 80'/%3E%3Cpath d='M20 80Q20 60 0 60'/%3E%3Cpath d='M40 22L58 40L40 58L22 40Z' stroke-width='0.5' opacity='0.5'/%3E%3C/svg%3E");
  --pattern-lattice-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' fill='none' stroke='%23006747' stroke-width='0.75'%3E%3Cpath d='M40 8L72 40L40 72L8 40Z'/%3E%3Cpath d='M0 20Q20 20 20 0'/%3E%3Cpath d='M60 0Q60 20 80 20'/%3E%3Cpath d='M80 60Q60 60 60 80'/%3E%3Cpath d='M20 80Q20 60 0 60'/%3E%3Cpath d='M40 22L58 40L40 58L22 40Z' stroke-width='0.5' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

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

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

a:hover {
  color: var(--primary-dark);
}

/* ---- Skip Link ---- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  z-index: 1000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 0.5rem;
  color: #fff;
}

/* ---- Container ---- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container--full {
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ---- Navigation ---- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(229,231,235,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--primary-dark);
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
  overflow: hidden;
}

.logo-lattice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-text {
  letter-spacing: -0.02em;
  font-family: var(--font-heading);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
  background: none;
  border-bottom-color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
  background: none;
  font-weight: 600;
  border-bottom-color: var(--primary);
}

/* Hamburger */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
}

.nav-toggle:hover {
  background: var(--bg-alt);
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background var(--transition);
}

.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  position: absolute;
  transition: transform var(--transition);
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---- Page Header ---- */

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 0;
  padding-top: 1rem;
  border-bottom: none;
  text-align: center;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-subtitle {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ---- Hero Section (Branded Dark) ---- */

.hero-wrap {
  position: relative;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: -20%;
  right: -5%;
  width: 55%;
  height: 140%;
  background-image: var(--pattern-lattice);
  background-size: 80px 80px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
}

.hero-palm {
  position: absolute;
  bottom: -10%;
  left: -2%;
  width: 280px;
  height: 380px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
  color: #fff;
}

.hero-palm svg {
  width: 100%;
  height: 100%;
}

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-sand);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-title .highlight {
  color: var(--accent-sand);
}

.hero-tagline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  max-width: 620px;
  margin: 0 auto 0.75rem;
  line-height: 1.65;
}

.hero-affiliation {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-wrap .btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.hero-wrap .btn-primary:hover {
  background: var(--accent-sand-light);
  border-color: var(--accent-sand-light);
  color: var(--primary-dark);
}

.hero-wrap .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.hero-wrap .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  box-shadow: none;
}

/* ---- Impact Numbers Strip ---- */

.impact-strip {
  border-bottom: 1px solid var(--border);
}

.impact-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.impact-stat {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border-light);
}

.impact-stat:last-child {
  border-right: none;
}

.impact-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-sand-dark);
  letter-spacing: -0.02em;
  line-height: 1;
}

.impact-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Brand Divider ---- */

.brand-divider {
  height: 40px;
  background-image: url("/assets/img/divider.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 200px 40px;
  opacity: 0.25;
  margin: 0 auto;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: 24px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,103,71,0.2);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,103,71,0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,103,71,0.2);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

/* ---- Section ---- */

.section {
  padding: 4rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--alt {
  background: var(--bg-alt);
  max-width: 100%;
  padding: 4rem 1.5rem;
}

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

.section-header {
  margin-bottom: 2.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-subtitle {
  margin-top: 0.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ---- Editorial Typography ---- */

.editorial-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.editorial-lede {
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.editorial-lede a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-list {
  display: grid;
  gap: 2rem;
  max-width: 780px;
}

.theme-item {
  padding: 0 0 0 1rem;
  border-left: 2px solid transparent;
  transition: border-color var(--transition), padding-left var(--transition);
}

.theme-item:hover {
  border-left-color: var(--accent-sand);
  padding-left: 1.25rem;
}

.theme-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.theme-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.page-lede {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 680px;
  margin: -1rem auto 2.5rem;
  text-align: center;
}

/* ---- Cards ---- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}

.card::after {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background-image: var(--pattern-lattice-dark);
  background-size: 40px 40px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

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

.card:hover::after {
  opacity: 0.08;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Affiliations ---- */

.affiliations {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1.75rem 2rem;
  background: var(--primary-light);
  border-radius: 24px;
  margin-top: 1rem;
}

.affiliation-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 500;
}

.affiliation-tag i {
  font-size: 0.8rem;
}

/* ---- News Timeline ---- */

.news-list {
  list-style: none;
}

.news-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0.75rem;
  border-bottom: none;
  align-items: baseline;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.news-item:hover {
  background: rgba(var(--primary-rgb), 0.03);
}

.news-item:last-child {
  border-bottom: none;
}

.news-date {
  flex-shrink: 0;
  width: 70px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}

.news-content {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.news-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-year-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
  border-bottom: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.news-year-header::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--primary);
  border-radius: 2px;
}

.news-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--primary);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  font-weight: 500;
  padding: 0.4rem 0;
}

.news-more-btn:hover {
  color: var(--primary-dark);
}

.news-hidden {
  display: none;
}

/* ---- Publications ---- */

.pub-list {
  list-style: none;
}

.pub-item {
  padding: 0.75rem 0.75rem;
  border-bottom: none;
  font-size: 0.9rem;
  line-height: 1.6;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.pub-item:hover {
  background: var(--bg-alt);
}

.pub-item:last-child {
  border-bottom: none;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
  font-size: 0.8rem;
  margin-left: 0.25rem;
}

.pub-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-sand-dark);
  background: var(--accent-sand-light);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.pub-category-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--text);
}

.pub-category-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.pub-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.pub-filter-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}

.pub-filter-btn:hover,
.pub-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Team (Editorial Layout) ---- */

.pi-section {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  max-width: 780px;
}

.pi-photo-wrap {
  flex-shrink: 0;
}

.pi-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
  box-shadow: var(--shadow-md);
}

.pi-content {
  flex: 1;
}

.pi-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.pi-name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.pi-role {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.pi-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.pi-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pi-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}

.pi-links a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pi-links a i {
  font-size: 0.75rem;
}

/* Team Members & Alumni — Clean List */

.team-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 600px;
}

.team-member {
  padding: 1rem 1rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.team-member:hover {
  background: var(--bg-alt);
}

.team-member-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.team-member-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Open Positions */

.positions-cta {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.positions-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.positions-cta p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  max-width: 540px;
  line-height: 1.6;
}

/* ---- CTA Banner ---- */

.cta-banner {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0 0;
}

.cta-banner h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  max-width: 540px;
  line-height: 1.6;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition);
}

.cta-link i {
  font-size: 0.8rem;
  transition: transform var(--transition);
}

.cta-link:hover {
  color: var(--primary-dark);
}

.cta-link:hover i {
  transform: translateX(4px);
}

/* ---- Contact (Editorial Layout) ---- */

.contact-primary {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: 600px;
}

.contact-primary-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 16px;
  font-size: 1.25rem;
}

.contact-primary-body {
  flex: 1;
}

.contact-primary-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.contact-primary-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.contact-primary-email {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 2px;
  transition: border-color var(--transition);
}

.contact-primary-email:hover {
  border-bottom-color: var(--primary);
}

.contact-details {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: 780px;
}

.contact-detail {
  flex: 1;
  min-width: 180px;
}

.contact-detail-label {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.contact-detail-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.contact-detail-value a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-light);
  padding-bottom: 1px;
  transition: border-color var(--transition);
}

.contact-detail-value a:hover {
  border-bottom-color: var(--primary);
}

.contact-detail-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}

.contact-social a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.contact-social a i {
  font-size: 0.75rem;
}

/* ---- Research Page ---- */

.research-narrative {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 780px;
}

.research-narrative h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.research-narrative p {
  margin-bottom: 1rem;
}

.research-narrative img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.research-image-left {
  float: left;
  max-width: 280px;
  margin: 0 1.5rem 1rem 0;
}

.research-image-right {
  float: right;
  max-width: 280px;
  margin: 0 0 1rem 1.5rem;
}

/* ---- Footer ---- */

.site-footer {
  position: relative;
  background: linear-gradient(160deg, var(--primary-darker) 0%, var(--primary) 50%, var(--teal-deep) 100%);
  border-top: none;
  margin-top: 0;
  overflow: hidden;
  color: rgba(255,255,255,0.8);
  border-radius: 0;
}

.site-footer .footer-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--pattern-lattice);
  background-size: 60px 60px;
  opacity: 0.05;
  pointer-events: none;
}

.site-footer .footer-palm {
  position: absolute;
  bottom: -10%;
  right: -3%;
  width: 250px;
  height: 340px;
  opacity: 0.06;
  pointer-events: none;
  color: #fff;
}

.site-footer .footer-palm svg {
  width: 100%;
  height: 100%;
}

.footer-container {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-lab-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.footer-affiliation {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
}

.footer-links a:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.2);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: rgba(255,255,255,0.8);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }

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

  .nav-links a {
    padding: 0.75rem 1rem;
  }

  .hero {
    padding: 4rem 1rem 3.5rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-pattern {
    width: 80%;
    opacity: 0.04;
  }

  .hero-palm {
    display: none;
  }

  .impact-strip-inner {
    flex-wrap: wrap;
  }

  .impact-stat {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--border-light);
    padding: 1.5rem 1rem;
  }

  .impact-stat:nth-child(2) {
    border-right: none;
  }

  .impact-stat:nth-child(3),
  .impact-stat:nth-child(4) {
    border-bottom: none;
  }

  .impact-number {
    font-size: 2rem;
  }

  .site-footer .footer-palm {
    display: none;
  }

  .pi-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .pi-photo {
    width: 120px;
    height: 120px;
  }

  .pi-links {
    justify-content: center;
  }

  .contact-primary {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-details {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-nav {
    justify-content: center;
  }

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

  .research-image-left,
  .research-image-right {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }

  .section {
    padding: 2.5rem 1rem;
  }

  .section--alt {
    padding: 2.5rem 1rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .editorial-heading {
    font-size: 1.6rem;
  }

  .editorial-lede {
    font-size: 1.1rem;
  }

  .page-lede {
    font-size: 1.05rem;
  }

  .theme-desc {
    font-size: 1rem;
  }

  .hero-tagline {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .impact-stat {
    flex: 1 1 100%;
    border-right: none;
  }


  .affiliations {
    flex-direction: column;
    align-items: center;
  }
}

/* ---- Scroll Animations ---- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.fade-in.visible {
  animation: fadeUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---- Print ---- */

@media print {
  .site-nav,
  .site-footer,
  .cta-banner,
  .positions-cta,
  .hero-actions {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
