/* =========================================
   AMALA JOHN — REDESIGNED SITE
   Font: Helvetica Neue | Palette: Avocado–Forest greens
   ========================================= */

:root {
  --forest:    #2b5329;
  --jade:      #3a7552;
  --avocado:   #4e7829;
  --pistachio: #7ab55c;
  --celadon:   #93c09a;
  --mint:      #b8ddc0;
  --bg:        #faf8f3;
  --bg-alt:    #f0f6f1;
  --sun:       #f0c430;
  --sun-pale:  #fef9e7;
  --text:      #1a2e1e;
  --text-mid:  #3d5444;
  --text-light:#6b8a72;
  --border:    #c8dfc8;
  --white:     #ffffff;
  --shadow:    0 4px 24px rgba(43,83,41,0.09);
  --shadow-lg: 0 8px 40px rgba(43,83,41,0.15);
  --r:         12px;
  --r-lg:      20px;
  --max:       1080px;
  --font:      'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--forest); text-decoration: none; transition: color .2s; }
a:hover { color: var(--jade); }
p { color: var(--text-mid); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
  background: rgba(58,117,82,0.1);
  border: 1px solid rgba(58,117,82,0.2);
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 0.85rem;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.65rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all .2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--forest);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--jade);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(43,83,41,0.28);
}
.btn-outline {
  border: 2px solid var(--forest);
  color: var(--forest);
}
.btn-outline:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-2px);
}

/* =========================================
   NAV
   ========================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0 2rem;
  transition: background .3s, box-shadow .3s;
}
#navbar.scrolled {
  background: rgba(250,248,243,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 16px rgba(43,83,41,0.08);
}
.nav-inner {
  max-width: calc(var(--max) + 160px);
  margin: 0 auto;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 2.2rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--forest); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--forest);
  border-radius: 2px;
  transition: all .2s;
}

/* =========================================
   HERO
   ========================================= */
#hero {
  min-height: 100vh;
  background: linear-gradient(150deg, #faf8f3 50%, #f0f7ee 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 100px 4rem 80px;
}

/* Vine SVGs absolutely positioned within hero */
.hero-sunshine {
  position: absolute;
  top: 50px;
  left: 55px;
  width: 180px;
  height: 180px;
  z-index: 1;
  pointer-events: none;
}
.vine {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.vine-left {
  left: 0;
  bottom: 0;
  width: 120px;
  height: 85%;
}
.vine-right {
  right: 0;
  top: 0;
  width: 90px;
  height: 75%;
}
.vine-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 110px;
}

.hero-layout {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 1rem;
  display: block;
}

#hero h1 {
  font-size: clamp(3.8rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--forest);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-location {
  font-size: 0.9rem;
  color: var(--avocado);
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 440px;
}

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

/* Photo frame */
.hero-photo-area {
  display: flex;
  justify-content: center;
}
.hero-photo-frame {
  position: relative;
  max-width: 400px;
  width: 100%;
}
.hero-photo-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -14px;
  right: 14px;
  bottom: -14px;
  border: 2.5px solid var(--jade);
  border-radius: 8px 46% 8px 46%;
  z-index: 0;
  opacity: 0.55;
}
.hero-photo-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px 46% 8px 46%;
  display: block;
  box-shadow: var(--shadow-lg);
}

/* =========================================
   TREE SIDEBAR
   ========================================= */
#page-wrapper {
  position: relative;
}
#tree-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 150px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}
#tree-svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
}
#tree-labels {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}
.tree-label {
  position: absolute;
  left: 98px;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--forest);
  white-space: nowrap;
  transition: color .3s;
  background: rgba(250,248,243,0.88);
  padding: 1px 5px;
  border-radius: 3px;
}
.tree-label.active {
  color: #b07800;
  background: rgba(254,249,231,0.92);
}

#page-main {
  padding-left: 160px;
}

/* =========================================
   ABOUT
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: start;
}
.about-text h2 { margin-bottom: 1.25rem; }

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.75rem;
}
.skill-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--forest);
  background: rgba(43,83,41,0.07);
  border: 1px solid rgba(43,83,41,0.18);
  padding: 4px 13px;
  border-radius: 50px;
}

/* --- Plant Cell Card --- */
.plant-cell-card {
  position: relative;
  border: 6px solid var(--forest);
  border-radius: 14px;
  background: rgba(184,221,192,0.1);
  padding: 2.25rem 1.75rem;
  min-height: 420px;
  overflow: hidden;
}
.cell-wall-label {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 10px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--forest);
  white-space: nowrap;
}
.section-alt .cell-wall-label { background: var(--bg-alt); }

/* Chloroplasts */
.chloroplast {
  position: absolute;
  background: var(--jade);
  border-radius: 50%;
  opacity: 0.6;
}
.chloroplast::after {
  content: '';
  position: absolute;
  top: 28%;
  left: 16%;
  right: 16%;
  height: 2px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
}
.chl-tl { width: 44px; height: 22px; top: 16px; left: 14px; transform: rotate(-15deg); }
.chl-tr { width: 38px; height: 20px; top: 20px; right: 12px; transform: rotate(22deg); }
.chl-bl { width: 42px; height: 21px; bottom: 18px; left: 12px; transform: rotate(12deg); }
.chl-br { width: 36px; height: 18px; bottom: 16px; right: 14px; transform: rotate(-18deg); }
.chl-ml { width: 30px; height: 15px; top: 50%; left: 8px; transform: translateY(-50%) rotate(5deg); opacity: 0.4; }

/* Central vacuole */
.vacuole {
  position: absolute;
  top: 18%;
  left: 14%;
  right: 14%;
  bottom: 18%;
  border: 1.5px dashed rgba(58,117,82,0.22);
  border-radius: 50%;
  pointer-events: none;
}

.cell-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.info-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.info-block strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-light);
  margin-bottom: 2px;
}
.info-block p {
  font-size: 0.875rem;
  color: var(--text-mid);
  margin: 0;
  line-height: 1.5;
}

/* =========================================
   RESEARCH — LEAF CARDS
   ========================================= */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.leaf-card {
  background: var(--white);
  border: 1.5px solid var(--mint);
  border-radius: 0 26% 0 26%;
  padding: 2.5rem 2.5rem 2.25rem;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.leaf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.leaf-card:nth-child(even) {
  border-radius: 26% 0 26% 0;
}

/* Midrib vein */
.leaf-vein {
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(147,192,154,0.5) 25%, rgba(147,192,154,0.5) 75%, transparent);
  transform: translateX(-50%);
  pointer-events: none;
}

.leaf-card.featured {
  border-color: var(--jade);
  background: linear-gradient(150deg, rgba(147,192,154,0.1) 0%, var(--white) 100%);
}

.leaf-badge {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--jade);
  padding: 3px 10px;
  border-radius: 50px;
}

.leaf-lab {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--jade);
  margin-bottom: 0.65rem;
}
.leaf-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest);
  border-bottom: 1.5px solid var(--celadon);
  padding-bottom: 1px;
}
.leaf-link:hover { border-color: var(--forest); }

/* =========================================
   PUBLICATIONS
   ========================================= */
.pub-list { display: flex; flex-direction: column; }

.pub-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-year {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--jade);
  padding-top: 2px;
}
.pub-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}
.pub-authors {
  font-size: 0.86rem;
  color: var(--text-mid);
  margin-bottom: 0.25rem;
}
.pub-journal {
  font-size: 0.86rem;
  color: var(--text-light);
  margin-bottom: 0.45rem;
}
.pub-doi {
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  color: var(--forest);
  font-weight: 500;
}
.pub-doi:hover { text-decoration: underline; }

/* =========================================
   EXPERIENCE / TIMELINE
   ========================================= */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 3.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--mint);
}
.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.25rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.45rem;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--jade);
  border: 3px solid var(--bg-alt);
  box-shadow: 0 0 0 2px var(--jade);
}
.section:not(.section-alt) .timeline-dot {
  border-color: var(--bg);
}

.timeline-date {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--jade);
  margin-bottom: 0.3rem;
}
.timeline-org {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}
.timeline-content p { font-size: 0.9rem; }

.talks-section h3 {
  font-size: 1.25rem;
  color: var(--forest);
  margin-bottom: 1rem;
}
.talks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.talks-list li {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.7rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 0.88rem;
  color: var(--text-mid);
}
.talk-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--jade);
  flex-shrink: 0;
  min-width: 34px;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-container { text-align: center; }
.contact-intro {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 460px;
  margin: 0 auto 3rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 2rem 2.25rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  min-width: 170px;
  color: var(--text-mid);
}
.contact-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--jade);
  color: var(--text);
}
.contact-icon { font-size: 1.75rem; }
.contact-card strong {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}
.contact-card span { font-size: 0.78rem; color: var(--text-light); }

/* =========================================
   FOOTER
   ========================================= */
footer {
  background: var(--forest);
  padding: 1.75rem 0;
  text-align: center;
}
.footer-inner p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1000px) {
  #page-main { padding-left: 120px; }
  #tree-sidebar { width: 110px; }
}

@media (max-width: 860px) {
  #page-main { padding-left: 0; }
  #tree-sidebar { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .research-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  #hero { padding: 90px 1.5rem 60px; }
  .hero-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero-photo-area { order: -1; }
  .hero-photo-frame { max-width: 280px; margin: 0 auto; }
  .section { padding: 56px 0; }
  .pub-item { grid-template-columns: 44px 1fr; gap: 1rem; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-card { width: 100%; max-width: 300px; }
  .nav-links {
    display: none;
    position: fixed;
    top: 62px; left: 0; right: 0;
    background: rgba(250,248,243,0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

@media (max-width: 400px) {
  .container { padding: 0 1.25rem; }
}
