/* Shared styles for Kevin Sit's academic site.
   Visual style: translucent ivory cards over a soft background,
   centered serif typography, circular profile photo. */

:root {
  --ivory: rgba(255, 255, 240, 0.8);
  --ivory-soft: rgba(255, 255, 240, 0.72);
  --accent: #7b6c94;
  --heading: #2c3e50;
}

* { box-sizing: border-box; }

body {
  font-family: 'Palatino Linotype', 'Baskerville Old Face', Baskerville, 'Times New Roman', serif;
  max-width: 800px;
  margin: 60px auto;
  line-height: 1.8;
  color: #333;
  /* Background image, with the gradient as a fallback if the image is missing. */
  background: url('../images/background.png') center / cover no-repeat fixed,
              linear-gradient(135deg, #e9e3d2 0%, #dcd2da 50%, #cdd7d0 100%) fixed;
  padding: 30px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--ivory);
  padding: 30px 80px;
  border-radius: 8px;
}

.site-title {
  text-align: center;
  margin-bottom: 30px;
}
.site-title a {
  color: #000;
  text-decoration: none;
  font-size: 1.7em;
  font-weight: normal;
  padding: 0;
}
.site-title a:hover { color: var(--accent); }

.nav-container {
  background-color: var(--ivory-soft);
  padding: 10px;
  border-radius: 8px;
  margin: 20px 0;
}
.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 25px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.nav-tabs li a {
  color: #000;
  text-decoration: none;
  font-size: 1.3em;
  font-weight: 530;
  padding: 5px 10px;
  border-radius: 4px;
  transition: color 0.3s ease;
}
/* Custom hover color per nav item */
.nav-tabs li a[href*="index"]:hover      { color: #a12d2e; }  /* About  - dark red */
.nav-tabs li a[href*="publications"]:hover { color: #DAA520; }  /* Publications - yellow */
.nav-tabs li a[href*="projects"]:hover   { color: #da691d; }  /* Projects - orange */
.nav-tabs li a[href*="contact"]:hover    { color: #01714d; }  /* Contact - green */
.nav-tabs li a[href$=".pdf"]:hover       { color: #0366b9; }  /* CV - blue */

h1 {
  text-align: center;
  font-size: 2.2em;
  color: var(--heading);
  font-weight: normal;
}

.profile-image {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 30px auto;
}

.profile-text,
.card {
  background-color: var(--ivory-soft);
  padding: 30px;
  border-radius: 8px;
  text-align: left;
  line-height: 1.5;
  margin: 40px 0;
}

p {
  font-size: 1.2em;
  text-align: justify;
}

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

/* Publications */
.pub-year {
  text-align: left;
  font-size: 1.5em;
  color: var(--heading);
  font-weight: normal;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  padding-bottom: 6px;
  margin: 30px 0 10px;
}
.entry { margin: 18px 0 26px; }
.entry h2 {
  font-size: 1.2em;
  color: var(--heading);
  font-weight: 600;
  margin: 0 0 4px;
  text-align: left;
}
.entry h2 a { color: var(--heading); text-decoration: none; }
.entry h2 a:hover { color: var(--accent); }
.entry p { font-size: 1.05em; text-align: left; margin: 2px 0; }
.me { font-weight: 700; }
.venue { font-style: italic; }
.collapsible {
  cursor: pointer;
  color: var(--accent);
  font-size: 1em;
  margin-top: 6px;
  user-select: none;
}
.collapsible::after { content: " \25BE"; }
.collapsible.active::after { content: " \25B4"; }
.content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.content p { font-size: 1.02em; text-align: justify; }

/* Projects */
.project { margin: 0 0 24px; }
.project h2 {
  font-size: 1.25em;
  color: var(--heading);
  font-weight: 600;
  text-align: left;
  margin: 0 0 6px;
}
.project p { font-size: 1.05em; text-align: left; }

/* Contact */
.contact-list { list-style: none; padding: 0; font-size: 1.2em; }
.contact-list li { margin: 12px 0; }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

footer {
  text-align: center;
  margin-top: 30px;
  color: #555;
  font-size: 0.95em;
}

@media (max-width: 600px) {
  body { margin: 20px auto; padding: 15px; }
  .container { padding: 24px 22px; }
  .profile-image { width: 200px; height: 200px; }
}
