/* ===========================
   CSS Lab — Computational Soil Science
   style.css
   =========================== */

:root {
  --soil-dark:   #2c1a0e;
  --soil-brown:  #6b3f1e;
  --soil-mid:    #a0632a;
  --soil-warm:   #c8844b;
  --soil-light:  #e8c49a;
  --sand:        #f5e6d0;
  --cream:       #fdf6ee;
  --green-deep:  #2d4a22;
  --green-mid:   #4a7c3f;
  --green-light: #7db56a;
  --white:       #ffffff;
  --text-dark:   #1a1208;
  --text-mid:    #4a3828;
  --text-light:  #7a6050;
  --shadow:      0 4px 24px rgba(44,26,14,0.10);
  --radius:      12px;
  --radius-lg:   20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
}

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

/* ---- REUSABLES ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; }

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soil-brown);
  background: rgba(107,63,30,0.09);
  border: 1px solid rgba(107,63,30,0.18);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--soil-dark);
  margin-bottom: 48px;
  line-height: 1.2;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soil-brown);
  color: var(--white);
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary:hover { background: var(--soil-dark); transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--soil-brown);
  padding: 13px 28px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 2px solid var(--soil-brown);
  transition: all 0.2s;
}
.btn-outline:hover { background: var(--soil-brown); color: var(--white); }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: rgba(253,246,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(107,63,30,0.1);
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow); }

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--soil-dark);
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--soil-brown); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--soil-brown); }

.hamburger {
  display: none;
  background: none; border: none;
  font-size: 1.4rem; color: var(--soil-dark);
  cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
}

.hero-label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--soil-mid);
  margin-bottom: 16px;
}

.hero-content { flex: 1; }

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  color: var(--soil-dark);
  line-height: 1.0;
  margin-bottom: 24px;
}
.hero-content h1 span { color: var(--soil-brown); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* Soil Layers Visual */
.hero-visual { flex: 0 0 280px; }

.soil-layers {
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(44,26,14,0.25);
  border: 3px solid rgba(44,26,14,0.12);
}

.layer {
  display: flex; align-items: center;
  padding: 18px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
  transition: flex 0.3s;
  cursor: default;
}
.layer:hover { flex: 1.5; }
.layer span { opacity: 0.9; }

.l1 { background: #4a7c3f; flex: 0.8; }
.l2 { background: #6b3f1e; flex: 1.2; }
.l3 { background: #8b5a2b; flex: 1.5; }
.l4 { background: #a0724a; flex: 1.2; }
.l5 { background: #b08060; flex: 0.8; }

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--soil-dark);
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 56px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stat:last-child { border-right: none; }
.stat strong {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem; font-weight: 900;
  color: var(--soil-light);
  line-height: 1;
}
.stat span {
  font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}

/* ---- ABOUT ---- */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-mid);
  margin-bottom: 20px;
  font-size: 1.05rem;
}
.about-text strong { color: var(--soil-brown); }
.about-text .btn-primary { margin-top: 12px; }

.about-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

.about-card {
  background: var(--cream);
  border: 1px solid rgba(107,63,30,0.12);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.about-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.about-card i {
  font-size: 1.6rem; color: var(--soil-brown);
  margin-bottom: 12px; display: block;
}
.about-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; color: var(--soil-dark);
  margin-bottom: 8px;
}
.about-card p { font-size: 0.88rem; color: var(--text-light); }

/* ---- RESEARCH ---- */
.research { background: var(--cream); }

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.research-card {
  background: var(--white);
  border: 1px solid rgba(107,63,30,0.1);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.research-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.research-card.featured {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;

  background: var(--soil-dark);
  color: var(--white);
  padding: 44px 52px;
}
.research-card.featured h3 {
  color: var(--soil-light);
  max-width: 720px;
  margin: 0;
}
.research-card.featured p {
  color: rgba(255,255,255,0.75);
  max-width: 780px;
  margin: 0;
}

.featured-badge {
  display: inline-block;
  color: var(--white);
  font-weight: 700;
}
.research-card.featured .rc-tag {
  margin-top: 6px;
}

.rc-icon {
  width: 52px; height: 52px;
  background: rgba(107,63,30,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--soil-brown);
  margin-bottom: 20px;
  flex-shrink: 0;
}
.research-card.featured .rc-icon {
  background: rgba(255,255,255,0.1);
  color: var(--soil-light);
  margin-bottom: 0;
}

.research-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; color: var(--soil-dark);
  margin-bottom: 12px;
}

.research-card p { font-size: 0.9rem; color: var(--text-light); }
.research-card.featured p { margin-bottom: 0; }

.rc-tag {
  display: inline-block;
  font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600;
  background: rgba(107,63,30,0.1);
  color: var(--soil-brown);
  border-radius: 100px;
  padding: 4px 12px;
  margin-top: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- TEAM ---- */
.team { background: var(--white); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.lead-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.advisory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 28px;
  margin-bottom: 32px;
}

.lead-card {
  background: var(--cream);
  border: 1px solid rgba(107,63,30,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.lead-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.lead-card .lead-avatar {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--white);
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
}
.lead-card .lead-info {
  padding: 24px;
}
.lead-card .lead-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; color: var(--soil-dark);
  margin-bottom: 6px;
}
.lead-card .lead-info .role,
.lead-card .lead-info .affil {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.lead-card .lead-info .role { color: var(--soil-brown); text-transform: uppercase; letter-spacing: 0.06em; }
.lead-card .lead-info .affil { color: var(--text-light); }

.team-card {
  background: var(--cream);
  border: 1px solid rgba(107,63,30,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.team-avatar {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--white);
}
.team-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.team-avatar.pi        { background: linear-gradient(135deg, var(--green-deep), var(--green-mid)); }
.team-avatar.cofound   { background: linear-gradient(135deg, #3a5a8a, #5b82b8); }
.team-avatar.researcher{ background: linear-gradient(135deg, var(--soil-brown), var(--soil-mid)); }
.team-avatar.advisor   { background: linear-gradient(135deg, #5a3a7a, #8a5ab8); }
.team-avatar.phd       { background: linear-gradient(135deg, var(--soil-brown), var(--soil-mid)); }
.team-avatar.msc       { background: linear-gradient(135deg, var(--soil-mid), var(--soil-warm)); }

.team-subhead {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-light);
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(107,63,30,0.12);
}
.team-subhead.advisory { margin-top: 48px; }

.advisory-card { border-color: rgba(90,58,122,0.15); }
.advisory-card .role { color: #7a5ab8; }

.team-info { padding: 20px; }
.team-info h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; color: var(--soil-dark); margin-bottom: 4px;
}
.team-info .role {
  font-size: 0.82rem; font-weight: 600;
  color: var(--soil-brown); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: 6px;
}
.team-info .affil { font-size: 0.85rem; color: var(--text-light); margin-bottom: 14px; }

.team-links { display: flex; gap: 12px; }
.team-links a {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(107,63,30,0.1);
  color: var(--soil-brown);
  border-radius: 8px; font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}
.team-links a:hover { background: var(--soil-brown); color: var(--white); }

.team-note {
  text-align: center; color: var(--text-light); font-size: 0.95rem;
}
.team-note a { color: var(--soil-brown); font-weight: 500; }
.team-note a:hover { text-decoration: underline; }

/* ---- PUBLICATIONS ---- */
.publications { background: var(--cream); }

.pub-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }

.pub-item {
  display: flex; align-items: center; gap: 24px;
  background: var(--white);
  border: 1px solid rgba(107,63,30,0.1);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.pub-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }

.pub-year {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 900;
  color: var(--soil-light);
  flex-shrink: 0; min-width: 56px;
}

.pub-detail { flex: 1; }
.pub-detail h4 {
  font-size: 1rem; color: var(--soil-dark);
  margin-bottom: 6px; font-weight: 500;
  line-height: 1.4;
}
.pub-detail p { font-size: 0.88rem; color: var(--text-light); margin-bottom: 10px; }
.pub-detail em { color: var(--soil-mid); font-style: italic; }

.pub-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.pub-tags span {
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(107,63,30,0.08);
  color: var(--soil-brown);
  border-radius: 100px; padding: 3px 10px;
}

.pub-link {
  width: 40px; height: 40px;
  background: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--soil-brown); font-size: 0.85rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.pub-link:hover { background: var(--soil-brown); color: var(--white); }

.pub-note {
  text-align: center; color: var(--text-light);
  font-size: 0.88rem; background: rgba(107,63,30,0.05);
  border: 1px dashed rgba(107,63,30,0.2);
  border-radius: var(--radius); padding: 14px;
}
.pub-note code {
  background: rgba(107,63,30,0.1); color: var(--soil-brown);
  padding: 2px 6px; border-radius: 4px; font-size: 0.85rem;
}

/* ---- CONTACT ---- */
.contact { background: var(--white); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start;
}

.contact-info p {
  color: var(--text-mid); margin-bottom: 32px; font-size: 1.05rem;
}

.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 24px;
}
.contact-item i {
  width: 36px; height: 36px;
  background: rgba(107,63,30,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--soil-brown); font-size: 0.9rem; flex-shrink: 0;
}
.contact-item span, .contact-item a {
  color: var(--text-mid); font-size: 0.95rem; line-height: 1.6;
}
.contact-item a:hover { color: var(--soil-brown); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form input,
.contact-form textarea {
  background: var(--cream);
  border: 1px solid rgba(107,63,30,0.18);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--soil-brown); }
.contact-form textarea { resize: vertical; }
.contact-form .btn-primary { align-self: flex-start; }

.form-note { font-size: 0.82rem; color: var(--text-light); }

/* ---- FOOTER ---- */
.footer { background: var(--soil-dark); color: rgba(255,255,255,0.7); }

.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; padding: 64px 0 48px;
}

.footer-brand .nav-logo { margin-bottom: 14px; color: var(--sand); }
.footer-brand .nav-logo span { color: var(--soil-warm); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.45); }

.footer-links h5 {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.9rem; color: rgba(255,255,255,0.6);
  transition: color 0.2s; display: flex; align-items: center; gap: 8px;
}
.footer-links a:hover { color: var(--soil-warm); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
  text-align: center;
  font-size: 0.83rem; color: rgba(255,255,255,0.3);
}

/* ---- MOBILE ---- */
@media (max-width: 900px) {
  .navbar { padding: 16px 24px; }
  .nav-links { display: none; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid rgba(107,63,30,0.1);
    padding: 20px 24px; gap: 16px; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }

  .hero { flex-direction: column; padding: 100px 24px 60px; text-align: center; }
  .hero-visual { width: 100%; }
  .soil-layers { flex-direction: row; }
  .layer { flex: 1; justify-content: center; writing-mode: vertical-rl; padding: 16px 8px; font-size: 0.65rem; }
  .layer:hover { flex: 1.5; }
  .hero-btns { justify-content: center; }

  .stats-bar { justify-content: center; }
  .stat { padding: 24px 28px; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .research-grid { grid-template-columns: 1fr 1fr; }
  .research-card.featured { grid-column: span 2; grid-template-columns: auto 1fr; }
  .research-card.featured .rc-tag { display: none; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card.featured { grid-column: span 1; grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: 1fr; }
  .pub-item { flex-wrap: wrap; }
  .pub-year { min-width: auto; }
}
