:root {
  --bg: #ffffff;
  --bg-alt: #f4f7f6;
  --fg: #14201c;
  --muted: #55655f;
  --accent: #0f766e;      /* teal — earth/remote-sensing */
  --accent-2: #15803d;    /* green */
  --card: #ffffff;
  --border: #e2e8e5;
  --shadow: 0 1px 3px rgba(20, 32, 28, 0.06), 0 8px 24px rgba(20, 32, 28, 0.05);
}
:root[data-theme="dark"] {
  --bg: #0c1512;
  --bg-alt: #101d19;
  --fg: #e7efec;
  --muted: #9db0a9;
  --accent: #2dd4bf;
  --accent-2: #4ade80;
  --card: #12201b;
  --border: #22332c;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 12px 30px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}

.skip-link {
  position: absolute; left: -999px;
  background: var(--accent); color: #fff; padding: 0.5rem 1rem; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

a { color: var(--accent); }

/* NAV */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 6vw;
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; font-size: 1.1rem; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav nav a:hover { color: var(--accent); }
#theme-toggle { background: none; border: none; cursor: pointer; font-size: 1.15rem; line-height: 1; }
@media (max-width: 760px) {
  .nav nav a:not(:last-of-type) { display: none; }
}

main { max-width: 1000px; margin: 0 auto; padding: 0 6vw; }

/* HERO */
.hero { padding: 5.5rem 0 3.5rem; }
.eyebrow {
  color: var(--accent); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 0.8rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.08;
  margin: 0.6rem 0 1rem; letter-spacing: -0.02em; max-width: 16ch;
}
.tagline { font-size: 1.2rem; color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }

.cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { border: 1px solid var(--border); color: var(--fg); background: var(--card); }

.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 2rem;
  margin: 2.5rem 0 1.25rem; padding-top: 1.75rem; border-top: 1px solid var(--border);
}
.hero-stats li { color: var(--muted); font-size: 0.95rem; }
.hero-stats strong { display: block; font-size: 1.8rem; color: var(--fg); line-height: 1; }

/* SECTIONS */
.section { padding: 3.5rem 0; border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 1.75rem; }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
.two-col p { margin-bottom: 1rem; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

.fact-card {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.5rem;
}
.fact-card h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.fact-card ul { list-style: none; display: grid; gap: 0.6rem; }
.fact-card li { color: var(--muted); font-size: 0.95rem; }

/* RESEARCH INTERESTS */
.interests { margin-top: 2rem; }
.interests h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag-list li {
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--accent); font-weight: 600; font-size: 0.9rem;
  padding: 0.4rem 0.9rem; border-radius: 999px;
}

/* PROJECT PICTURE GRID */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.15rem; }
.project-tile {
  display: flex; flex-direction: column; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 0; overflow: hidden; box-shadow: var(--shadow); font: inherit; color: inherit;
  text-decoration: none; transition: transform 0.15s, border-color 0.15s;
}
.project-tile:hover, .project-tile:focus-visible { transform: translateY(-3px); border-color: var(--accent); outline: none; }
.project-thumb {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; font-size: 2.8rem; overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #0f766e), var(--c2, #15803d));
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-caption { padding: 1rem 1.2rem 1.2rem; display: grid; gap: 0.25rem; }
.project-caption strong { font-size: 1.05rem; }
.project-caption span { color: var(--muted); font-size: 0.9rem; }

/* STORY PAGES */
.story { max-width: 760px; }
.back-link { display: inline-block; color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.back-link:hover { text-decoration: underline; }
.story-hero {
  display: flex; align-items: center; justify-content: center;
  height: 160px; font-size: 3.4rem; border-radius: 14px; margin: 1.25rem 0 1.5rem;
  background: linear-gradient(135deg, var(--c1, #0f766e), var(--c2, #15803d));
}
.story-hero-img {
  display: block; width: 100%; max-height: 320px; object-fit: cover;
  border-radius: 14px; margin: 1.25rem 0 1.5rem;
}
.story h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.pm-meta { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 1.5rem; }
.story-body p { color: var(--muted); margin-bottom: 1rem; }
.story-body ul { color: var(--muted); margin: 0 0 1rem 1.2rem; }
.story-body strong { color: var(--fg); }
.story-body .btn { margin: 0.35rem 0.6rem 0.35rem 0; }
.story-body .btn.primary { color: #fff; }
.story-foot { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.journey-chain {
  margin: 1.75rem 0; padding: 1.4rem 1.6rem; border-radius: 12px;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--accent); font-weight: 700; line-height: 2;
  text-align: center; letter-spacing: 0.01em;
}

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.15rem; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.4rem; box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* TIMELINE */
.timeline { list-style: none; position: relative; padding-left: 1.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline li { position: relative; padding: 0 0 1.75rem 0.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.5rem; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
}
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.tl-head h3 { font-size: 1.12rem; }
.tl-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tl-org { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin: 0.1rem 0 0.5rem; }
.timeline p:last-child { color: var(--muted); font-size: 0.95rem; }

/* PUBLICATIONS / LISTS */
.pub-list, .award-list { list-style: none; margin-bottom: 1.75rem; }
.pub-list li {
  padding: 0.9rem 0; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.pub-tag {
  font-size: 0.75rem; color: var(--accent); background: var(--bg-alt);
  padding: 0.2rem 0.6rem; border-radius: 999px; white-space: nowrap; font-weight: 600;
}
.award-list li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border); color: var(--muted);
}
.award-list .tl-date { color: var(--muted); }

/* CONTACT */
.contact { text-align: center; }
.contact > p { color: var(--muted); max-width: 50ch; margin: 0 auto 1.75rem; }
.contact-links { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }

footer {
  text-align: center; padding: 2.5rem 6vw; color: var(--muted);
  font-size: 0.88rem; border-top: 1px solid var(--border);
}
