/* ---------- Base ---------- */
:root {
  --bg: #fdfcfa;
  --bg-alt: #f6f3ee;
  --text: #1f2328;
  --text-muted: #5c6470;
  --accent: #d14d28;
  --accent-soft: rgba(209, 77, 40, 0.1);
  --line: #e4ded5;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(31, 35, 40, 0.06), 0 8px 24px rgba(31, 35, 40, 0.05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 252, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-size: 0.92rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { text-decoration: none; color: var(--accent); }
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.nav-icons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-icons a { color: var(--text-muted); display: inline-flex; }
.nav-icons a:hover { color: var(--accent); }
.nav-icons svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-bar { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 10px; }
  .nav-links { gap: 16px; flex-wrap: wrap; }
  .nav-icons { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 80px 0 120px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.hero .tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 26px;
}
.hero .tagline strong { color: var(--text); font-weight: 600; }

.hero .intro {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  max-width: 640px;
  color: var(--text-muted);
  margin-bottom: 34px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #b53e1d; }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent-soft); }

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-hint .arrow {
  display: block;
  margin: 8px auto 0;
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounce 1.8s infinite;
}
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ---------- Section headings ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); }

.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 8px;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 600px;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding: 20px 0 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(to bottom, transparent, var(--line) 60px, var(--line) calc(100% - 60px), transparent);
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 48px 64px;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tl-item.visible { opacity: 1; transform: translateY(0); }

.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }

.tl-dot {
  position: absolute;
  top: 6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.tl-dot svg { width: 17px; height: 17px; fill: currentColor; }
.tl-item:nth-child(odd) .tl-dot { right: -19px; }
.tl-item:nth-child(even) .tl-dot { left: -19px; }

.tl-year {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.tl-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tl-body {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.tl-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 4px;
  color: var(--text);
  display: inline-block;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tl-link:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }

@media (max-width: 720px) {
  .timeline::before { left: 19px; }
  .tl-item,
  .tl-item:nth-child(odd),
  .tl-item:nth-child(even) {
    width: 100%;
    left: 0;
    text-align: left;
    padding: 0 0 56px 60px;
  }
  .tl-item:nth-child(odd) .tl-dot,
  .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
}

/* ---------- Cards (research / projects) ---------- */
.page-head { padding: 64px 0 12px; }
.page-head h1 {
  font-family: var(--serif);
  font-size: 2.4rem;
  margin-bottom: 10px;
}
.page-head p { color: var(--text-muted); max-width: 640px; }

.card-list { padding: 36px 0 90px; display: grid; gap: 26px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.card.visible { opacity: 1; transform: translateY(0); }

.card .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 3px 9px;
}
.tag.neutral { color: var(--text-muted); background: var(--bg-alt); }

.card h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.card p { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.card ul {
  margin: 4px 0 10px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card ul li { margin-bottom: 5px; }

.group-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 28px 0 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
