/* ============================================
   ACADEMIC PERSONAL WEBSITE - MAIN STYLESHEET
   ============================================
   Customize colors, fonts, and spacing below.
*/

/* ---------- CSS Variables (easy to customize) ---------- */
:root {
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-heading: #222222;
  --color-link: #2a7ae2;
  --color-link-hover: #1756a9;
  --color-nav-bg: #f8f8f8;
  --color-border: #e0e0e0;
  --color-footer-bg: #f8f8f8;
  --color-icon: #555555;
  --color-icon-hover: #2a7ae2;
  --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 820px;
  --nav-height: 60px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* ---------- Navigation ---------- */
nav {
  background: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

nav .site-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-heading);
  text-decoration: none;
}

nav .site-title:hover {
  text-decoration: none;
  color: var(--color-link);
}

nav .nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

nav .nav-links a {
  font-size: 0.95rem;
  color: var(--color-text-light);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--color-link);
  border-bottom-color: var(--color-link);
  text-decoration: none;
}

/* ---------- Main Content ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

/* ---------- About Page Layout ---------- */
.about-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-sidebar {
  flex-shrink: 0;
  width: 220px;
  text-align: center;
}

.headshot {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  margin-bottom: 16px;
}

.about-sidebar .name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.about-sidebar .affiliation {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* CV Download Button */
.cv-link {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--color-link);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--color-link);
  transition: background 0.2s, color 0.2s;
  margin-bottom: 16px;
}

.cv-link:hover {
  background: var(--color-link);
  color: #fff;
  text-decoration: none;
}

/* Social Icons Row */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-nav-bg);
  transition: background 0.2s, transform 0.2s;
}

.social-icons a:hover {
  background: var(--color-border);
  transform: scale(1.1);
}

.social-icons img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.social-icons a:hover img {
  opacity: 1;
}

/* About Bio */
.about-content {
  flex: 1;
}

.about-content h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-heading);
  margin-bottom: 16px;
  font-weight: 600;
}

.about-content p {
  margin-bottom: 14px;
  color: var(--color-text);
}

/* ---------- Research Page ---------- */
.research-intro {
  margin-bottom: 30px;
}

.research-intro p {
  margin-bottom: 14px;
}

.research-diagram {
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  display: block;
  border-radius: 4px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-heading);
  margin: 36px 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
}

.paper {
  margin-bottom: 28px;
}

.paper-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-heading);
  margin-bottom: 4px;
}

.paper-title a {
  color: var(--color-heading);
}

.paper-title a:hover {
  color: var(--color-link);
}

.paper-meta {
  font-size: 0.88rem;
  color: var(--color-text-light);
  margin-bottom: 6px;
  font-style: italic;
}

.paper-description {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.65;
}

/* ---------- Page Title ---------- */
.page-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-heading);
  margin-bottom: 20px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 60px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .about-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-sidebar {
    width: 100%;
  }

  .about-content {
    text-align: left;
  }

  .about-content h1 {
    text-align: center;
  }

  nav .nav-container {
    flex-direction: column;
    height: auto;
    padding: 12px 20px;
    gap: 8px;
  }

  main {
    padding: 24px 16px;
  }
}
