:root {
  --bg: #fffaf2;
  --ink: #13201a;
  --ink-muted: #4a5a53;
  --line: #d9cfba;
  --brand: #0a8f6a;
  --brand-2: #ff6b35;
  --card: #fffdf9;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 8% 12%, #ffe7cc 0, transparent 32%), radial-gradient(circle at 92% 82%, #dff8ef 0, transparent 30%), var(--bg);
}
.site-header { position: sticky; top: 0; display: flex; gap: 1rem; justify-content: space-between; align-items: center; padding: 1rem 6vw; border-bottom: 1px solid var(--line); background: rgba(255, 250, 242, 0.92); }
.brand { font-family: "Playfair Display", Georgia, serif; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.04em; }
.nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-links a { color: var(--ink-muted); text-decoration: none; font-weight: 600; }
main { width: min(1100px, 90vw); margin: 0 auto; padding: 2rem 0 3rem; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-family: "Syne", sans-serif; font-size: clamp(2rem, 5vw, 4rem); max-width: 14ch; }
h1 span { color: var(--brand-2); }
.lead { max-width: 65ch; color: var(--ink-muted); }
.panel { margin-top: 1.2rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.85); }
.stats-grid, .cards, .contact-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card, .contact-links a, .stats-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem; background: var(--card); text-decoration: none; color: inherit; }
.timeline article { border-left: 3px solid #b9e8d9; padding-left: 0.9rem; margin-bottom: 0.8rem; }
.btn { display: inline-flex; padding: 0.6rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 700; background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0; }
.tag-row { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-row li { border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem; background: #fff; }
.site-footer { width: min(1100px, 90vw); margin: 0 auto 2rem; display: flex; justify-content: space-between; color: var(--ink-muted); }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Sub-page hero */
.page-hero { margin-bottom: 0.5rem; }
.page-hero h1 { max-width: 20ch; }
.page-hero .eyebrow { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); font-weight: 700; margin-bottom: 0.2rem; }

/* Teaser section headers */
.teaser-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.teaser-header h2 { margin: 0; }
.teaser-link { font-size: 0.88rem; color: var(--brand); text-decoration: none; font-weight: 600; white-space: nowrap; }
.teaser-link:hover { text-decoration: underline; }

/* Nav active state */
.nav-links a.active { color: var(--brand); }

/* Detailed timeline */
.timeline-detailed { position: relative; padding-left: 1.5rem; }
.timeline-detailed::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--brand), #b9e8d9); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 1.8rem; }
.timeline-marker { position: absolute; left: -1.5rem; top: 0.35rem; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 3px solid var(--bg); z-index: 1; }
.timeline-content h3 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.timeline-content .meta { color: var(--ink-muted); font-size: 0.85rem; margin: 0 0 0.4rem; }
.timeline-content p { margin: 0 0 0.5rem; line-height: 1.6; }
.timeline-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.timeline-tags li { font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgba(10,143,106,0.08); color: var(--brand); font-weight: 600; }

/* Stat numbers */
.stat-number { font-family: "Syne", sans-serif; font-size: 2rem; font-weight: 800; color: var(--brand); margin: 0 0 0.25rem; line-height: 1.1; }
.stat-label { margin: 0; font-size: 0.88rem; line-height: 1.4; color: var(--ink); }
.stat-meta { margin: 0.35rem 0 0; font-size: 0.72rem; color: var(--ink-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.stats-grid article { text-align: center; padding: 1.2rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.stats-grid article:hover { border-color: #98d5c2; box-shadow: 0 8px 28px rgba(19,32,26,0.06); }

/* Project grid */
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--card); text-decoration: none; color: inherit; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.project-card:hover { transform: translateY(-2px); border-color: #98d5c2; box-shadow: 0 12px 40px rgba(19,32,26,0.06); }
.project-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); font-weight: 700; }
.project-card h3 { margin: 0; font-size: 1.15rem; }
.project-card p { margin: 0; color: var(--ink-muted); font-size: 0.92rem; line-height: 1.5; }
.project-link { margin-top: auto; font-size: 0.85rem; color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .contact-links, .project-grid { grid-template-columns: 1fr; }
  .site-header, .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
  .stats-grid { grid-template-columns: 1fr; }
}

/* Hero badges */
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.4rem 0 0.6rem; }
.badge { font-size: 0.78rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(10,143,106,0.1); color: var(--brand); border: 1px solid rgba(10,143,106,0.2); }

/* Company logo in experience headers */
.exp-header { display: flex; align-items: center; gap: 0.65rem; }
.company-logo { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; flex-shrink: 0; }
.exp-header h3 { margin: 0; }
.exp-header .meta { margin: 0; }
.timeline article .exp-header { margin-bottom: 0.3rem; }
.exp-bullets { margin: 0.4rem 0 0 1.2rem; padding: 0; list-style: disc; font-size: 0.92rem; color: var(--muted); line-height: 1.55; }
.exp-bullets li { margin-bottom: 0.3rem; }
.timeline .exp-bullets { margin-top: 0.5rem; }
.timeline-content .exp-bullets { margin-bottom: 0.6rem; }

/* Publication cards */
.pub-list { display: grid; gap: 1rem; }
.pub-card { border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; background: var(--card); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pub-card:hover { border-color: #98d5c2; box-shadow: 0 8px 32px rgba(19,32,26,0.06); }
.pub-venue { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); font-weight: 700; margin-bottom: 0.25rem; }
.pub-card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; line-height: 1.3; }
.pub-authors { margin: 0 0 0.4rem; font-size: 0.85rem; color: var(--ink-muted); }
.pub-authors strong { color: var(--ink); }
.pub-desc { margin: 0 0 0.6rem; font-size: 0.88rem; color: var(--ink-muted); line-height: 1.5; }
.pub-links { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.pub-links a { font-size: 0.82rem; color: var(--brand); font-weight: 600; text-decoration: none; padding: 0.2rem 0.6rem; border: 1px solid var(--brand); border-radius: 999px; transition: all 0.15s ease; }
.pub-links a:hover { background: var(--brand); color: #fff; }
.pub-cite { font-size: 0.78rem; color: var(--ink-muted); font-weight: 600; }

/* Visitor Counter */
.visitor-stats { padding: 0.8rem 1.2rem; }
.visitor-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.visitor-icon { font-size: 1.3rem; line-height: 1; }
.visitor-stats .visitor-number { font-family: "Syne", sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1; }
.visitor-stats .visitor-label { font-size: 0.85rem; color: var(--ink-muted); font-weight: 600; }
.visitor-dash-link { margin-left: auto; font-size: 0.82rem; color: var(--brand); font-weight: 600; text-decoration: none; }
.visitor-dash-link:hover { text-decoration: underline; }
