/* ============================================================
   Academic Personal Website — warm & approachable theme
   Palette: cream background / terracotta + sage accents
   To change colors, edit the variables in :root below.
   ============================================================ */

:root {
  --bg: #FAF5EC;            /* page background: warm cream */
  --card: #FFFFFF;          /* cards */
  --ink: #40382E;           /* main text: warm dark brown */
  --muted: #7C6F60;         /* secondary text */
  --accent: #C25A3C;        /* terracotta: buttons, active nav */
  --accent-dark: #A44A30;   /* terracotta, darker: link text */
  --accent-soft: #F7E7DE;   /* terracotta, light tint */
  --sage: #7D9476;          /* sage green accent */
  --sage-soft: #EAF0E4;
  --amber: #D98E32;
  --amber-soft: #FBF0DC;
  --border: #EEDFCB;
  --shadow: 0 2px 10px rgba(120, 90, 55, 0.08);
  --shadow-hover: 0 6px 20px rgba(120, 90, 55, 0.15);
  --radius: 16px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

main { min-height: 60vh; }

/* ---------------- nav ---------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(250, 245, 236, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  padding-bottom: 13px;
}

.brand {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }

.nav-links a {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: background .15s, color .15s;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.nav-links a.active {
  background: var(--accent);
  color: #fff;
}

/* ---------------- hero (home) ---------------- */

.hero { padding: 56px 0 8px; }

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text { flex: 1; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.hero .kanji {
  margin: 0 0 8px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", Georgia, serif;
  font-size: 20px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.hero .role {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 0 0 6px;
}

.hero .tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 34em;
}

.portrait {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--sage-soft));
  border: 5px solid #fff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

/* ---------------- sections ---------------- */

.section { margin-top: 64px; }

.section-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 8px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
}

p.lead { font-size: 18px; }

/* ---------------- cards ---------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 15.5px;
  color: var(--muted);
}

/* stacked cards (blog templates and long-form lists) */
.card-stack .card { margin-bottom: 18px; }
.card-stack .card:last-child { margin-bottom: 0; }

.card ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15.5px;
}

.card ul li { margin-bottom: 4px; }

.card .card-meta {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* publication abstract blurb */
.pub-abstract {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 10px;
}

/* inline "more" link after a section */
.more-link {
  display: inline-block;
  margin-top: 22px;
  font-weight: 700;
}

/* ---------------- blog ---------------- */

.empty-note {
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.post-meta {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 4px;
}

/* ---------------- news ---------------- */

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news-list li {
  display: flex;
  gap: 20px;
  padding: 13px 4px;
  border-bottom: 1px dashed var(--border);
}

.news-list li:last-child { border-bottom: none; }

.news-date {
  flex-shrink: 0;
  min-width: 100px;
  font-weight: 700;
  font-size: 14px;
  color: #5A7052;
  background: var(--sage-soft);
  padding: 3px 12px;
  border-radius: 999px;
  height: fit-content;
  text-align: center;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-ghost {
  background: var(--card);
  color: var(--accent-dark);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--accent); }

/* ---------------- publications ---------------- */

.pub-group { margin-bottom: 36px; }

.pub-group h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.pub-item .pub-title { font-weight: 800; margin: 0 0 4px; }

.pub-item .pub-authors { margin: 0 0 6px; font-size: 15.5px; }

.pub-item .pub-venue {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  padding: 3px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  transition: background .15s;
}

.pub-links a:hover { background: var(--accent); color: #fff; }

.tag {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  font-style: normal;
}

.tag-journal { background: var(--accent-soft); color: var(--accent-dark); }
.tag-conference { background: var(--sage-soft); color: #5A7052; }
.tag-poster { background: var(--amber-soft); color: #A56A1D; }

/* ---------------- footer ---------------- */

.site-footer {
  margin-top: 80px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}

.site-footer a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
}

/* ---------------- responsive ---------------- */

@media (max-width: 720px) {
  .site-nav .container {
    flex-direction: column;
    gap: 8px;
  }

  .hero { padding-top: 40px; }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
  }

  .hero .tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .contact-row { justify-content: center; }

  .card-grid { grid-template-columns: 1fr; }

  .news-list li { flex-direction: column; gap: 6px; }
}
