:root {
  --color-bg: #fdfbf8;
  --color-surface: #f9f7f4;
  --color-text: #2d2926;
  --color-text-muted: #6b6560;
  --color-accent: #5a7a6b;
  --color-link: #5a7a6b;
  --color-link-hover: #3d5c4d;
  --color-border: #e2ddd5;
  --color-institution: #822633;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --max-width: 1100px;
  --navbar-height: 60px;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

a { color: var(--color-link); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: 2px solid #d4a96a; outline-offset: 2px; }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--navbar-height);
}
.navbar-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 1.2rem;
  color: var(--color-text); letter-spacing: 0.04em;
  text-decoration: none;
}
.navbar-brand:hover { color: var(--color-accent); }
.navbar-menu { display: flex; gap: 1.8rem; align-items: center; }
.navbar-link {
  font-size: 0.92rem; color: var(--color-text-muted);
  text-decoration: none; transition: color 0.15s;
}
.navbar-link:hover { color: var(--color-accent); }
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger {
  display: block; width: 22px; height: 2px;
  background: var(--color-text); position: relative;
}
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; width: 22px; height: 2px;
  background: var(--color-text); left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  .navbar-menu {
    display: none; flex-direction: column;
    position: absolute; top: var(--navbar-height); left: 0; right: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem; gap: 0.8rem;
  }
  .navbar-menu.open { display: flex; }
}

/* ---- Hero ---- */
.hero { padding: 4rem 0 3rem; }
.hero-grid {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 3rem; align-items: start;
}
.hero-photo-img {
  width: 200px; height: 200px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  display: block;
}
.hero-text h1 {
  font-family: var(--font-heading); font-size: 2.4rem;
  margin-bottom: 0.3rem; color: var(--color-text);
}
.hero-title { font-size: 1.15rem; color: var(--color-text-muted); margin-bottom: 0.1rem; }
.hero-institution { font-size: 1.05rem; color: var(--color-accent); margin-bottom: 1.2rem; font-weight: 500; }
.hero-intro { font-size: 1rem; line-height: 1.65; color: var(--color-text); margin-bottom: 1.5rem; }
.hero-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; }

@media (max-width: 640px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero-buttons { justify-content: center; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 0.55rem 1.3rem;
  border-radius: 6px; font-size: 0.92rem; font-weight: 500;
  transition: all 0.18s; text-decoration: none; cursor: pointer;
}
.btn-primary {
  background: var(--color-accent); color: #fff; border: 1px solid var(--color-accent);
}
.btn-primary:hover { background: var(--color-link-hover); border-color: var(--color-link-hover); color: #fff; }
.btn-secondary {
  background: transparent; color: var(--color-accent);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-accent); background: var(--color-surface); color: var(--color-accent); }

/* ---- Research Areas Accordion ---- */
.research-areas {
  padding: 3rem 0 4rem;
  background: var(--color-surface);
  scroll-margin-top: var(--navbar-height);
}
.research-areas h2 {
  font-family: var(--font-heading); font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.ra-accordion { margin-bottom: 0.5rem; }
.ra-header {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 1rem 1.2rem;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 6px; cursor: pointer;
  font-size: 1.05rem; font-weight: 600; color: var(--color-text);
  font-family: var(--font-body);
  transition: background 0.15s;
}
.ra-header:hover { background: #f0ebe4; }
.ra-chevron { transition: transform 0.2s; font-size: 0.85rem; }
.ra-header.open .ra-chevron { transform: rotate(180deg); }
.ra-body {
  display: none; padding: 0.8rem 1.2rem 1rem;
  border: 1px solid var(--color-border); border-top: none;
  border-radius: 0 0 6px 6px; background: var(--color-bg);
}
.ra-body.open { display: block; }
.ra-body ul { list-style: none; padding: 0; }
.ra-body li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem; line-height: 1.45;
}
.ra-body li:last-child { border-bottom: none; }
.ra-body li em { color: var(--color-text-muted); }
.ra-viewall {
  display: inline-block; margin-top: 0.8rem;
  font-size: 0.9rem; font-weight: 500;
}

/* ---- Page single ---- */
.page-single { padding: 3rem 0 4rem; }
.page-single h1 {
  font-family: var(--font-heading); font-size: 2rem;
  margin-bottom: 1.5rem;
}

/* ---- Prose ---- */
.prose h2 {
  font-family: var(--font-heading); font-size: 1.4rem;
  margin: 2rem 0 0.8rem; color: var(--color-text);
  border-bottom: 1px solid var(--color-border); padding-bottom: 0.4rem;
}
.prose h3 {
  font-family: var(--font-heading); font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}
.prose p { margin-bottom: 1.25em; }
.prose ul, .prose ol { margin-bottom: 1.25em; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.4em; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }

/* ---- Writings / Publication List ---- */
.writings-page { padding: 3rem 0 4rem; }
.writings-page h1 {
  font-family: var(--font-heading); font-size: 2rem;
  margin-bottom: 1.5rem;
}

.tab-strip {
  position: sticky; top: var(--navbar-height); z-index: 20;
  background: var(--color-bg); padding: 0.8rem 0;
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.tab-btn {
  padding: 0.45rem 1rem; border-radius: 20px;
  border: 1px solid var(--color-border); background: transparent;
  font-size: 0.88rem; color: var(--color-text-muted);
  cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body);
}
.tab-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tab-btn.active {
  background: var(--color-accent); color: #fff;
  border-color: var(--color-accent);
}

.result-count {
  font-size: 0.85rem; color: var(--color-text-muted);
  margin: 1rem 0 0.5rem;
}

.pub-list { margin-top: 0.5rem; }
.pub-item {
  display: block; padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.pub-item-title {
  font-weight: 600; font-size: 1rem; color: var(--color-link);
  text-decoration: none; display: block; margin-bottom: 0.3rem;
}
.pub-item-title:hover { color: var(--color-link-hover); }
.pub-item-meta {
  font-size: 0.88rem; color: var(--color-text-muted); line-height: 1.5;
}
.pub-item-venue em, .pub-item-venue strong { font-style: italic; }
.pub-item-links { margin-top: 0.4rem; display: flex; gap: 0.5rem; }
.pub-link {
  font-size: 0.8rem; padding: 0.2rem 0.6rem;
  border: 1px solid var(--color-border); border-radius: 4px;
  color: var(--color-text-muted); background: var(--color-surface);
  text-decoration: none; transition: all 0.15s;
}
.pub-link:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ---- Publication Detail ---- */
.pub-detail .pub-meta {
  font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 0.5rem;
}
.pub-detail .pub-year { margin-left: 0.3rem; }
.pub-detail .pub-venue {
  font-size: 0.95rem; color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}
.pub-detail .pub-abstract { margin-bottom: 1.5rem; }
.pub-detail .pub-abstract h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.pub-detail .pub-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem; }

/* ---- Footer ---- */
.site-footer {
  background: #2d2926; color: #e8e0d5; padding: 2.5rem 0;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 1.5rem; text-align: center;
}
.footer-nav { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-nav a { color: #c5bdb3; font-size: 0.88rem; text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-credit { font-size: 0.8rem; color: #8a8279; }
.footer-credit a { color: #a89e94; }
.footer-credit a:hover { color: #e8e0d5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
