/*
Theme Name: Warren Lab
Theme URI: https://warren-lab.com
Author: Warren Lab
Description: Multi-page academic lab theme with Matomo analytics integration. Modern, clean design with custom post types for Team Members and Publications.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: warrenlab
*/

/* ===== VARIABLES ===== */
:root {
  --navy: #0a1628;
  --navy-mid: #132240;
  --navy-light: #1a3058;
  --orange: #e8552d;
  --orange-dark: #d04420;
  --orange-light: #f4724f;
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --warm-white: #fefdfb;
  --cream: #f8f6f0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a5a;
  --text-light: #8a8a9a;
  --border: #e2e0da;
  --bg-section: #f3f1eb;
  --blue-accent: #3b82f6;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--orange); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; height: auto; }

/* ===== NAV ===== */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 2rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
}
.nav-brand img {
  height: 36px; width: auto;
}
.nav-brand-text {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.25rem; font-weight: 700; color: var(--navy);
  letter-spacing: -0.03em;
}
.nav-brand-text span { color: var(--orange); }

.nav-menu { display: flex; gap: 1.8rem; list-style: none; }
.nav-menu li { list-style: none; }
.nav-menu a {
  text-decoration: none; color: var(--text-secondary);
  font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; position: relative; padding: 0.2rem 0;
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: var(--orange); transition: width 0.3s;
}
.nav-menu a:hover { color: var(--navy); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a { color: var(--navy); }
.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_item > a::after { width: 100%; }

.menu-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 4px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--navy);
  margin: 5px 0; transition: 0.3s;
}

/* ===== HERO (front page only) ===== */
.hero {
  min-height: 92vh; display: flex; align-items: center;
  background: linear-gradient(145deg, var(--navy) 0%, #0d1f3c 60%, #111b30 100%);
  position: relative; overflow: hidden; padding: 7rem 2rem 4rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(232,85,45,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(20,184,166,0.06) 0%, transparent 45%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.03;
  background-image:
    linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero-content {
  max-width: 1200px; margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center;
}
.hero-text .affiliation {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: rgba(255,255,255,0.45); font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500; margin-bottom: 1.5rem;
}
.hero-text .affiliation::before {
  content: ''; width: 20px; height: 2px; background: var(--orange);
}
.hero-text h1 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: clamp(2.6rem, 4.8vw, 3.8rem);
  color: white; line-height: 1.08; margin-bottom: 1.5rem;
  letter-spacing: -0.04em; font-weight: 700;
}
.hero-text h1 .accent { color: var(--orange); }
.hero-text .subtitle {
  font-size: 1.05rem; color: rgba(255,255,255,0.6);
  line-height: 1.75; margin-bottom: 2.5rem; max-width: 520px;
}
.hero-cta {
  display: inline-flex; gap: 1rem; flex-wrap: wrap;
}
.hero-cta a {
  padding: 0.75rem 1.6rem; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--orange); color: white;
}
.btn-primary:hover { background: var(--orange-dark); color: white; }
.btn-outline {
  background: transparent; color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.5); color: white; }

.hero-visual {
  display: flex; justify-content: center; align-items: center;
}
.hero-logo-large {
  width: 320px; height: auto; opacity: 0.85;
  filter: drop-shadow(0 0 60px rgba(232,85,45,0.2));
  animation: float-logo 6s ease-in-out infinite;
}
@keyframes float-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== PAGE HEADERS ===== */
.page-header {
  background: linear-gradient(145deg, var(--navy) 0%, #0d1f3c 100%);
  padding: 8rem 2rem 3rem; text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(232,85,45,0.06) 0%, transparent 60%);
}
.page-header .container { position: relative; z-index: 1; }
.page-header .page-sub {
  color: var(--orange); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.15em;
  font-weight: 600; margin-bottom: 0.6rem;
}
.page-header h1 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem); color: white;
  letter-spacing: -0.03em; font-weight: 700;
}
.page-header .page-desc {
  color: rgba(255,255,255,0.5); font-size: 1rem;
  max-width: 600px; margin: 0.8rem auto 0; line-height: 1.7;
}

/* ===== SECTIONS ===== */
section { padding: 5rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }
.section-label {
  color: var(--orange); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.15em;
  font-weight: 700; margin-bottom: 0.6rem;
}
.section-title {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--navy); line-height: 1.12;
  margin-bottom: 1rem; letter-spacing: -0.03em; font-weight: 700;
}
.section-desc {
  color: var(--text-secondary); font-size: 1.02rem;
  line-height: 1.75; max-width: 640px;
}

/* ===== VISION / ABOUT ===== */
.vision-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; margin-top: 2.5rem; align-items: start;
}
.vision-text p {
  color: var(--text-secondary); font-size: 1.02rem;
  line-height: 1.8; margin-bottom: 1rem;
}
.highlight-card {
  background: var(--bg-section); border-radius: 10px;
  padding: 1.4rem 1.6rem; border-left: 3px solid var(--orange);
  margin-bottom: 1rem; transition: transform 0.2s;
}
.highlight-card:hover { transform: translateX(3px); }
.highlight-card h4 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1rem; color: var(--navy); font-weight: 700;
  margin-bottom: 0.3rem;
}
.highlight-card p {
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6;
}

/* ===== RESEARCH CARDS ===== */
.research-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.research-card {
  background: white; border-radius: 10px; padding: 2rem;
  border: 1px solid var(--border); transition: box-shadow 0.3s, transform 0.2s;
  position: relative; overflow: hidden;
}
.research-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--orange), var(--orange-light));
}
.research-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.05); transform: translateY(-2px); }
.research-card .num {
  font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem;
  color: var(--orange); opacity: 0.25; line-height: 1; margin-bottom: 0.6rem;
  font-weight: 700;
}
.research-card h3 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.1rem; color: var(--navy); margin-bottom: 0.6rem;
  line-height: 1.3; font-weight: 700;
}
.research-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }

/* ===== TEAM GRID ===== */
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.team-card {
  background: white; border: 1px solid var(--border);
  border-radius: 10px; padding: 2rem; text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.team-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.05); transform: translateY(-2px); }
.team-card .team-photo {
  width: 110px; height: 110px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1rem; display: block;
  border: 3px solid var(--bg-section);
}
.team-avatar-placeholder {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem;
  color: white; font-weight: 700;
}
.team-card h3 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.05rem; color: var(--navy); margin-bottom: 0.25rem; font-weight: 700;
}
.team-card .role {
  color: var(--orange); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 700; margin-bottom: 0.8rem;
}
.team-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; }

.team-section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; color: var(--navy); font-weight: 700;
  margin: 3rem 0 1rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

/* ===== PUBLICATIONS ===== */
.pub-item {
  background: white; border-radius: 8px; padding: 1.3rem 1.8rem;
  margin-bottom: 0.8rem; border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.pub-item:hover { border-color: var(--orange); }
.pub-item h4 {
  font-size: 0.93rem; color: var(--navy); margin-bottom: 0.25rem;
  line-height: 1.4; font-weight: 600;
}
.pub-meta { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }
.pub-journal { font-size: 0.8rem; color: var(--text-light); font-style: italic; margin-top: 0.15rem; }
.pub-year-tag {
  display: inline-block; background: rgba(232,85,45,0.08); color: var(--orange);
  font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem;
  border-radius: 3px; margin-bottom: 0.4rem;
}
.pub-download {
  display: inline-block; margin-top: 0.4rem;
  font-size: 0.8rem; color: var(--orange); font-weight: 600;
}

/* ===== NEWS ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem; margin-top: 2rem;
}
.news-card {
  background: white; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); transition: box-shadow 0.3s;
}
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.05); }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 1.4rem; }
.news-card-body .date {
  color: var(--text-light); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 0.4rem; font-weight: 500;
}
.news-card-body h3 {
  font-family: 'Space Grotesk', 'DM Sans', sans-serif;
  font-size: 1.08rem; color: var(--navy); margin-bottom: 0.4rem;
  font-weight: 700; line-height: 1.3;
}
.news-card-body p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.news-card-body .read-more {
  display: inline-block; margin-top: 0.6rem; color: var(--orange);
  font-weight: 600; font-size: 0.82rem;
}

/* ===== SERVICES ===== */
.services-section {
  background: linear-gradient(145deg, var(--navy) 0%, #0d1f3c 100%);
  color: white; position: relative; overflow: hidden;
}
.services-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(232,85,45,0.06) 0%, transparent 50%);
}
.services-section .container { position: relative; z-index: 1; }
.services-section .section-label { color: var(--orange-light); }
.services-section .section-title { color: white; }
.services-section .section-desc { color: rgba(255,255,255,0.65); }
.services-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem;
}
.service-item {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; padding: 1.8rem;
}
.service-item h4 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem;
  color: white; margin-bottom: 0.5rem; font-weight: 700;
}
.service-item p { color: rgba(255,255,255,0.55); font-size: 0.88rem; line-height: 1.7; }
.partner-bar {
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.partner-bar h4 {
  color: rgba(255,255,255,0.35); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.8rem;
}
.partner-names { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.partner-names span {
  color: rgba(255,255,255,0.45); font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.03em; padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 5px;
}
.cta-button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--orange); color: white; padding: 0.75rem 1.6rem;
  border-radius: 6px; text-decoration: none; font-weight: 600;
  font-size: 0.88rem; transition: background 0.2s; margin-top: 1.5rem;
}
.cta-button:hover { background: var(--orange-dark); color: white; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; margin-top: 2rem;
}
.contact-text p {
  color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; font-size: 1rem;
}
.contact-card {
  background: var(--bg-section); border-radius: 10px; padding: 2rem;
}
.contact-card h4 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem;
  color: var(--navy); margin-bottom: 1rem; font-weight: 700;
}
.info-row {
  display: flex; gap: 0.8rem; margin-bottom: 0.7rem;
  color: var(--text-secondary); font-size: 0.88rem;
}
.info-row .label {
  color: var(--text-light); min-width: 55px; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding-top: 3px; font-weight: 600;
}

/* ===== PAGE CONTENT (for generic pages) ===== */
.page-content {
  max-width: 860px; margin: 0 auto; padding: 3rem 2rem 5rem;
}
.page-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem; color: var(--navy); margin: 2rem 0 0.8rem;
  letter-spacing: -0.02em; font-weight: 700;
}
.page-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; color: var(--navy); margin: 1.5rem 0 0.6rem; font-weight: 700;
}
.page-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; }
.page-content img { border-radius: 8px; margin: 1.5rem 0; }
.page-content ul, .page-content ol {
  color: var(--text-secondary); margin: 1rem 0 1rem 1.5rem; line-height: 1.8;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.35);
  padding: 2rem; text-align: center; font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.site-footer a { color: var(--orange-light); }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-menu { display: none; }
  .menu-toggle { display: block; }
  .nav-menu.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; padding: 1rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border); gap: 0.8rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-text .affiliation { justify-content: center; }
  .hero-text .subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-visual { margin-top: 1rem; }
  .hero-logo-large { width: 200px; }
  .vision-grid, .services-grid, .contact-grid { grid-template-columns: 1fr; }
  .research-cards { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}
