/* ============================================================
   GIULIA PEDRIELLI — Personal Academic Website
   Colorful & Creative Theme
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --coral:   #ff6b47;
  --teal:    #00c9b1;
  --purple:  #7c4dff;
  --gold:    #ffb300;
  --navy:    #0d0d2b;
  --dark:    #1a1a3e;
  --mid:     #2d2d5e;
  --light:   #f8f7ff;
  --white:   #ffffff;
  --text:    #2b2b3b;
  --muted:   #6b6b8a;
  --border:  #e8e6f0;

  --font-body: 'Inter', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(13,13,43,0.10);
  --shadow-lg: 0 12px 48px rgba(13,13,43,0.18);
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Navigation ─────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(13,13,43,0.85);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

#navbar.scrolled {
  padding: 0.7rem 2.5rem;
  background: rgba(13,13,43,0.97);
  box-shadow: var(--shadow);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  background: linear-gradient(135deg, var(--coral), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--coral);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--dark) 50%, var(--mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 5rem;
}

.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
}
.shape-1 { width: 500px; height: 500px; background: var(--purple); top: -10%; left: -10%; }
.shape-2 { width: 400px; height: 400px; background: var(--coral);  bottom: 0;   right: -5%; }
.shape-3 { width: 300px; height: 300px; background: var(--teal);   top: 40%;    left: 40%; }

.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  max-width: 1100px;
  width: 100%;
  z-index: 1;
}

.hero-text { flex: 1; }

.hero-greeting {
  color: var(--teal);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-name .accent {
  background: linear-gradient(90deg, var(--coral), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  color: rgba(255,255,255,0.65);
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.hero-subtitle {
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--purple));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(255,107,71,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,107,71,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* Hero Avatar */
.hero-avatar { flex-shrink: 0; }

.avatar-ring {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--purple), var(--teal));
  padding: 4px;
  position: relative;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--mid);
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--white);
  font-weight: 700;
}

/* Scroll Hint */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 2s ease 1s both;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid rgba(255,255,255,0.4);
  border-bottom: 2px solid rgba(255,255,255,0.4);
  transform: rotate(45deg);
  animation: bounce 1.5s infinite;
}

/* ── Section Shared Styles ──────────────────────────────── */
section { padding: 6rem 0; }
.alt-bg { background: var(--light); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--coral), var(--purple));
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--dark);
  line-height: 1.2;
}

.section-desc {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ── About ──────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-bio p {
  color: var(--text);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.about-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
}
.chip:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,107,71,0.15);
}

.about-interests h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.2rem;
}

.interest-list { display: flex; flex-direction: column; gap: 0.7rem; }

.interest-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--text);
}

.bullet {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bullet.coral  { background: var(--coral); }
.bullet.teal   { background: var(--teal); }
.bullet.purple { background: var(--purple); }
.bullet.gold   { background: var(--gold); }

/* ── Research Cards ─────────────────────────────────────── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}

.research-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.research-card[data-color="coral"]  { }
.research-card[data-color="coral"]::before  { background: var(--coral); }
.research-card[data-color="teal"]::before   { background: var(--teal); }
.research-card[data-color="purple"]::before { background: var(--purple); }
.research-card[data-color="gold"]::before   { background: var(--gold); }

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

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.research-card[data-color="coral"]  .card-icon { color: var(--coral); }
.research-card[data-color="teal"]   .card-icon { color: var(--teal); }
.research-card[data-color="purple"] .card-icon { color: var(--purple); }
.research-card[data-color="gold"]   .card-icon { color: var(--gold); }

.research-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.research-card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

.card-tag {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-grant {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  background: rgba(0,201,177,0.1);
  border-radius: 4px;
  padding: 0 4px;
}

/* ── Publications ───────────────────────────────────────── */
.pub-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(135deg, var(--coral), var(--purple));
  color: var(--white);
  border-color: transparent;
}

.pub-list { display: flex; flex-direction: column; gap: 1.25rem; }

.pub-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pub-item.hidden { display: none; }

.pub-item:hover {
  border-color: var(--coral);
  box-shadow: 0 4px 16px rgba(255,107,71,0.1);
}

.pub-year {
  flex-shrink: 0;
  font-weight: 900;
  font-size: 1rem;
  color: var(--coral);
  min-width: 3rem;
  padding-top: 0.15rem;
}

.pub-title {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.pub-authors { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.2rem; }
.pub-venue   { color: var(--text);  font-size: 0.9rem; font-style: italic; margin-bottom: 0.75rem; }

.pub-links { display: flex; gap: 0.75rem; }

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--purple);
  border-radius: 50px;
  transition: var(--transition);
}
.pub-link:hover {
  background: var(--purple);
  color: var(--white);
}

.pub-more { text-align: center; margin-top: 2.5rem; }
.pub-more .btn-outline {
  color: var(--dark);
  border-color: var(--border);
}
.pub-more .btn-outline:hover {
  background: var(--light);
  border-color: var(--purple);
  color: var(--purple);
}

/* ── Lab ────────────────────────────────────────────────── */
.group-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.group-heading.alumni { margin-top: 3.5rem; }

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

.lab-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.lab-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
}

.lab-info h4 { font-weight: 700; color: var(--dark); margin-bottom: 0.2rem; }

.lab-role {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.3rem;
}

.lab-topic { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.75rem; }

.lab-links { display: flex; gap: 0.5rem; }
.lab-links a {
  color: var(--muted);
  font-size: 1rem;
  transition: color var(--transition);
}
.lab-links a:hover { color: var(--purple); }

/* Alumni */
.alumni-list { display: flex; flex-direction: column; gap: 0.75rem; }

.alumni-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.alumni-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.alumni-degree {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 0.75rem;
}

.alumni-now {
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
  margin-left: 0.75rem;
}

/* ── Contact ────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--coral);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.contact-item strong {
  display: block;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.contact-item a {
  color: var(--purple);
  transition: color var(--transition);
}
.contact-item a:hover { color: var(--coral); }
.contact-item span { color: var(--muted); font-size: 0.95rem; }

.contact-social { display: flex; gap: 0.75rem; margin-top: 0.5rem; }

.social-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-size: 1rem;
  transition: var(--transition);
}
.social-btn:hover {
  background: linear-gradient(135deg, var(--coral), var(--purple));
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(255,107,71,0.3);
}

.cv-card {
  background: linear-gradient(135deg, var(--navy), var(--mid));
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow-lg);
}

.cv-icon {
  font-size: 3rem;
  color: var(--coral);
  margin-bottom: 1rem;
  display: block;
}

.cv-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.cv-card p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2rem;
  font-size: 0.875rem;
}

footer p { margin-bottom: 0.25rem; }
footer .heart { color: var(--coral); }

/* ── Animations ─────────────────────────────────────────── */
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(6px); }
}

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

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-content    { flex-direction: column-reverse; gap: 2.5rem; text-align: center; }
  .hero-actions    { justify-content: center; }
  .about-grid      { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid    { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  #navbar { padding: 1rem 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 1.5rem 2rem; gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .avatar-ring { width: 200px; height: 200px; }
  section { padding: 4rem 0; }
  .research-grid { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   LANDING PAGE LAYOUT
   ============================================================ */

body.landing-page {
  overflow: hidden; /* no outer page scroll */
}

.landing {
  display: grid;
  grid-template-columns: 60fr 40fr;
  height: calc(100vh - 64px);
  margin-top: 64px;
}

/* ── Left Bio Column ── */
.landing-bio {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  padding: 2.5rem 3rem 2rem;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g transform='rotate(22 100 100)' fill='none' stroke='%230d0d2b'><ellipse cx='100' cy='100' rx='13' ry='8' stroke-width='0.9' opacity='0.22'/><ellipse cx='100' cy='100' rx='26' ry='17' stroke-width='0.8' opacity='0.16'/><ellipse cx='100' cy='100' rx='40' ry='26' stroke-width='0.7' opacity='0.11'/><ellipse cx='100' cy='100' rx='55' ry='36' stroke-width='0.6' opacity='0.08'/><ellipse cx='100' cy='100' rx='70' ry='46' stroke-width='0.5' opacity='0.05'/><ellipse cx='100' cy='100' rx='86' ry='57' stroke-width='0.4' opacity='0.03'/></g><circle cx='100' cy='100' r='2.2' fill='%230d0d2b' opacity='0.24'/></svg>");
  background-repeat: repeat;
  background-size: 200px 200px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.landing-bio::-webkit-scrollbar { width: 5px; }
.landing-bio::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Hero block inside bio column */
.landing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.landing-hero-text .hero-greeting {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.landing-hero-text .hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.landing-hero-text .accent { color: var(--coral); }

.landing-hero-text .hero-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.landing-hero-text .hero-subtitle {
  font-size: 1rem;
  color: var(--muted);
  font-style: italic;
}

.landing-avatar .avatar-ring {
  width: 155px;
  height: 155px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--coral);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
}

.landing-avatar .avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-avatar .avatar-fallback {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--coral);
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* About text */
.landing-about p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.landing-about p:last-of-type { margin-bottom: 0; }

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.about-col-heading {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.interest-list.compact li {
  font-size: 0.95rem;
  padding: 0.15rem 0;
}

/* Nav Tiles */
.nav-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 0.75rem;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition);
}

.nav-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.nav-tile[data-color="coral"]  { border-top-color: var(--coral); }
.nav-tile[data-color="teal"]   { border-top-color: var(--teal); }
.nav-tile[data-color="purple"] { border-top-color: var(--purple); }
.nav-tile[data-color="gold"]   { border-top-color: var(--gold); }

.nav-tile i { font-size: 1.6rem; }
.nav-tile[data-color="coral"]  i { color: var(--coral); }
.nav-tile[data-color="teal"]   i { color: var(--teal); }
.nav-tile[data-color="purple"] i { color: var(--purple); }
.nav-tile[data-color="gold"]   i { color: var(--gold); }

.tile-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.tile-sub {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.3;
}

/* ── Right News Sidebar ── */
.news-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.news-sidebar-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  padding: 1.1rem 1.25rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.news-sidebar-title i { color: var(--gold); }

.news-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.news-sidebar-scroll::-webkit-scrollbar { width: 4px; }
.news-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.news-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* Landing responsive: stack on narrow screens */
@media (max-width: 900px) {
  body.landing-page { overflow: auto; }
  .landing {
    grid-template-columns: 1fr;
    height: auto;
  }
  .landing-bio { padding: 2rem 1.5rem; }
  .landing-hero { flex-direction: column-reverse; text-align: center; }
  .about-cols { grid-template-columns: 1fr; gap: 1rem; }
  .nav-tiles { grid-template-columns: repeat(2, 1fr); }
  .news-sidebar {
    height: 320px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}

/* ── News Items (shared across sidebar and any future use) ── */
.news-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.92rem;
  line-height: 1.5;
  transition: background 0.15s;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { background: rgba(255,255,255,0.04); }

.news-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.1rem;
  width: fit-content;
}

.tag-pub   { background: rgba(124,77,255,0.25); color: #c4b5fd; }
.tag-grad  { background: rgba(255,179,0,0.2);   color: #fcd34d; }
.tag-talk  { background: rgba(0,201,177,0.2);   color: #5eead4; }
.tag-grant { background: rgba(255,107,71,0.2);  color: #fca98a; }
.tag-award { background: rgba(255,179,0,0.2);   color: #fcd34d; }

.news-text { color: rgba(255,255,255,0.75); }
.news-text em { font-style: italic; color: rgba(255,255,255,0.9); }

/* Collapse sidebar on narrow screens */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .news-sidebar {
    position: static;
    height: auto;
    max-height: 260px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ============================================================
   RESEARCH AREA BLOBS (index.html)
   ============================================================ */

.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.area-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  text-decoration: none;
  color: var(--navy);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  border-top: 5px solid transparent;
}

.area-card[data-color="coral"]  { border-top-color: var(--coral); }
.area-card[data-color="teal"]   { border-top-color: var(--teal); }
.area-card[data-color="purple"] { border-top-color: var(--purple); }

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

.area-number {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  right: 1.25rem;
  pointer-events: none;
}

.area-card[data-color="coral"]  .area-number { color: var(--coral);  opacity: 0.10; }
.area-card[data-color="teal"]   .area-number { color: var(--teal);   opacity: 0.10; }
.area-card[data-color="purple"] .area-number { color: var(--purple); opacity: 0.10; }

.area-body { flex: 1; }

.area-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--navy);
  line-height: 1.35;
}

.area-body > p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.area-subareas {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.area-subareas li {
  font-size: 0.85rem;
  color: var(--text);
  padding-left: 1.25rem;
  position: relative;
}

.area-subareas li::before {
  content: '→';
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}

.area-card[data-color="coral"]  .area-subareas li::before { color: var(--coral); }
.area-card[data-color="teal"]   .area-subareas li::before { color: var(--teal); }
.area-card[data-color="purple"] .area-subareas li::before { color: var(--purple); }

.area-arrow {
  margin-top: 2rem;
  font-size: 1.1rem;
  color: var(--muted);
  transition: color var(--transition), transform var(--transition);
  align-self: flex-end;
}

.area-card:hover .area-arrow {
  color: var(--coral);
  transform: translateX(5px);
}

.area-card[data-color="teal"]:hover   .area-arrow { color: var(--teal); }
.area-card[data-color="purple"]:hover .area-arrow { color: var(--purple); }

@media (max-width: 900px) {
  .area-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESEARCH SUB-PAGES (research-*.html)
   ============================================================ */

.rp-hero {
  padding: 7rem 0 4rem;
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.rp-hero::before {
  content: '';
  pointer-events: none;
}

.rp-hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.rp-coral  .rp-hero-tag  { background: rgba(255,107,71,0.25);  color: #ffa58a; }
.rp-teal   .rp-hero-tag  { background: rgba(0,201,177,0.25);   color: #5eeedd; }
.rp-purple .rp-hero-tag  { background: rgba(124,77,255,0.25);  color: #b39dff; }

.rp-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 700px;
}

.rp-coral  .rp-hero h1 em,
.rp-coral  .rp-hero h1 span { color: var(--coral); font-style: normal; }
.rp-teal   .rp-hero h1 em,
.rp-teal   .rp-hero h1 span { color: var(--teal);  font-style: normal; }
.rp-purple .rp-hero h1 em,
.rp-purple .rp-hero h1 span { color: var(--purple);font-style: normal; }

.rp-hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 620px;
  line-height: 1.7;
}

.rp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.rp-back:hover { color: var(--white); }

/* Sub-area sections */
.subarea {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

.subarea:last-child { border-bottom: none; }

.subarea-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.subarea-figure {
  aspect-ratio: 4/3;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--muted);
  background: var(--light);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

.subarea-figure i {
  font-size: 2.5rem;
  opacity: 0.3;
}

.subarea-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
}

.subarea-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.subarea-content p {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.subarea-content p:last-of-type { margin-bottom: 1.5rem; }

.key-pubs-heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.key-pubs {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.key-pubs li {
  font-size: 0.875rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.key-pubs li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--muted);
}

.key-pubs a {
  color: var(--coral);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rp-teal   .key-pubs a { color: var(--teal); }
.rp-purple .key-pubs a { color: var(--purple); }

.agency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.agency-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--light);
  color: var(--muted);
  border: 1px solid var(--border);
}

.rp-coral  .agency-tag { border-color: rgba(255,107,71,0.3);  color: var(--coral);  background: rgba(255,107,71,0.06); }
.rp-teal   .agency-tag { border-color: rgba(0,201,177,0.3);   color: var(--teal);   background: rgba(0,201,177,0.06); }
.rp-purple .agency-tag { border-color: rgba(124,77,255,0.3);  color: var(--purple); background: rgba(124,77,255,0.06); }

@media (max-width: 768px) {
  .subarea-inner { grid-template-columns: 1fr; }
  .rp-hero { padding: 5rem 0 3rem; }
}
