/* =========================================================
   Dilworth Lab — Shared Styles (styles.css)
   One theme system: :root (light default) + html.dark override
   ========================================================= */

/* -------- Theme variables -------- */
:root{
  /* light mode default */
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,.04);
  --panel2: rgba(0,0,0,.06);
  --text: rgba(0,0,0,.90);
  --muted: rgba(0,0,0,.68);
  --line: rgba(0,0,0,.12);
  --accent: #0ea5e9;
  --accent2:#7c3aed;
  --shadow: 0 18px 55px rgba(0,0,0,.10);

  --radius: 18px;
  --radius2: 24px;
  --max: 1120px;
}

/* dark mode override (when JS adds <html class="dark">) */
html.dark{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.09);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.14);
  --accent: #6ee7ff;
  --accent2:#a78bfa;
  --shadow: 0 18px 55px rgba(0,0,0,.45);
}

/* -------- Base / reset -------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
               Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background-color: var(--bg);

  /* keeps your “dark site” feel but still works in light mode */
  background:
    radial-gradient(1200px 700px at 12% 10%, rgba(110,231,255,.14), transparent 60%),
    radial-gradient(900px 600px at 85% 30%, rgba(167,139,250,.12), transparent 62%),
    radial-gradient(900px 600px at 55% 90%, rgba(34,197,94,.08), transparent 62%),
    linear-gradient(180deg, rgba(7,11,20,.35), var(--bg) 40%, rgba(7,11,20,.25));
  overflow-x:hidden;
}
/* ✅ FORCE heading colors to follow theme */
h1,h2,h3,h4,h5,h6{ color: var(--text) !important; }

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.site-logo{
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: white;
  padding: 4px;
  border-radius: 10px;
  flex-shrink: 0;
}
/* -------- Typography sizing “force” -------- */
h1{
  font-size: clamp(38px, 4.2vw, 52px) !important;
  line-height: 1.05 !important;
  text-align: center;
  margin: 0 0 10px;
}

.section-head h2{
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px !important;
  margin: 0;
}

.panel h3{
  font-size: 18px !important;
  letter-spacing: -0.2px !important;
  margin: 0 0 8px;
}

/* -------- Layout wrappers -------- */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 34px 18px 64px;
}

.section{ margin-top: 48px; }

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* center option when you want it */
.section-head.center{
  text-align:center;
  justify-content:center;
  flex-direction:column;
  align-items:center;
}
.section-head.center p{
  margin-left:auto;
  margin-right:auto;
}

/* -------- Grid systems -------- */
.grid,
.dl-grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;                 /* <- “buffer space” between panels */
  margin-top: 18px;
}

.col-4{ grid-column: span 4; }
.col-6{ grid-column: span 6; }
.col-8{ grid-column: span 8; }
.col-12{ grid-column: span 12; }

@media (max-width: 980px){
  .col-4,.col-6,.col-8{ grid-column: span 12; }
}

/* -------- Panels -------- */
.panel{
  padding: 22px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel p{
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

/* center text inside a panel when needed */
.panel.center,
.panel.text-center{
  text-align:center;
}
.panel.center p,
.panel.text-center p{
  margin-left:auto;
  margin-right:auto;
}

/* -------- Research intro box -------- */
.research-intro{
  padding: 24px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(110,231,255,.10), rgba(167,139,250,.08));
  box-shadow: var(--shadow);
}

#research .research-intro p{
  font-size: 17px !important;
  line-height: 1.75 !important;
  color: var(--muted);
}

/* -------- Research / Epigenetics image block -------- */
.research-figure{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}
.research-figure img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.figure-caption{
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

/* -------- Hero keyword pills -------- */
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;

  background: #ffffff;                 /* white pill */
  color: #0b1220;                      /* dark text */

  border: 1px solid rgba(0,0,0,.12);
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  letter-spacing: .2px;
}

/* -------- Quick links -------- */
.quick-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.quick-link{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:15px;
  line-height:1.5;
  color: var(--muted);
}
.quick-link:hover{ color: var(--text); }

.icon{
  width: 14px;
  height: 14px;
  min-width:14px;
  min-height:14px;
  flex: 0 0 14px;
  opacity: .75;
  display:block;
}
.quick-link:hover .icon{ opacity: .95; }

/* -------- Team -------- */
.team{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 18px;
}

/* 2 per row */
.team .person{ grid-column: span 6 !important; }
@media (max-width: 980px){
  .team .person{ grid-column: span 12 !important; }
}

.person{
  column-gap: 20px;
  overflow: hidden;        /* clip anything that might overflow */
  padding: 20px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.person:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}

.person-header {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.person-description{
  grid-column: 2;
  grid-row: 1;
  font-size: 16px;
  line-height: 1.5;
  margin-left: 1.5rem;
  place-self: center; 
}

/* Stack photo/name above description on narrow screens */
@media (max-width: 600px){
  .person-inner{
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
}

/* avatar size (change these two numbers to grow/shrink headshots) */
.avatar{
  width:144px;
  height:144px;
  border-radius:24px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  overflow:hidden;
  flex: 0 0 144px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.person-name {
  font-size: 18px;
  margin-top: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.person .role{
  font-size: 16px;
  margin-top: 4px;
  line-height: 1.2;
  color: var(--muted);
}

.person-tag {
  grid-column: 1 / -1;
}

/* group photo block */
.team-group-photo{
  margin-top: 18px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-height: 360px;
}
.team-group-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -------- Conference gallery -------- */
.conference-gallery{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 900px){
  .conference-gallery{ grid-template-columns: 1fr; }
}
.conference-image{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
}
.conference-image img{
  width: 100%;
  height: auto;
  display: block;
}
.conference-image figcaption{
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* -------- Footer -------- */
.footer{
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  gap: 10px 18px;
  align-items:center;
  justify-content:space-between;
  color: var(--muted);
  font-size: 12px;
}
/* FORCE side-by-side contact layout */
#contact .panel .contact-flex{
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Text column */
#contact .contact-text{
  flex: 1 1 auto;
}

/* Image column */
#contact .contact-image{
  flex: 0 0 auto;
}

#contact .contact-image img{
  width: 240px;
  height: auto;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

/* Mobile: stack vertically */
@media (max-width: 768px){
  #contact .panel .contact-flex{
    flex-direction: column !important;
    text-align: center;
  }

  #contact .contact-image img{
    width: 96px;
  }
}