/* ========================================
   Base / Theme
======================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;

  --bg: #f9fafb;
  --surface: #ffffff;

  --text: #1f2937;
  --text-muted: #4b5563;

  --border: #e5e7eb;
  --shadow-sm: 0 1px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  --radius: 10px;

  /* Layout heights */
  --header-height: 170px;
  --nav-height: 59px;

  --container-width: 1100px;
  --content-top-space: calc(var(--header-height) + var(--nav-height) + 2rem);
}

/* ========================================
   Reset
======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;  
  scrollbar-gutter: stable
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* ========================================
   Typography
======================================== */

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

p {
  margin-bottom: 1rem;
}

ul {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ========================================
   Fixed Header
======================================== */

.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.header-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.profile-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  display: block;
}

.profile-info h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.affiliation {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 0.2rem;
}

/* ========================================
   Navigation
======================================== */

.main-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 999;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  background-color: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-link {
  display: inline-block;
  padding: 1rem 1.5rem;
  color: var(--text);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.nav-link:hover {
  color: var(--primary-dark);
  background-color: rgba(37, 99, 235, 0.08);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========================================
   Main Content
======================================== */

.main-content {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--content-top-space) 2rem 3rem;
}

.section {
  background-color: transparent;
  padding: 1rem 0 2rem;
  animation: fadeIn 0.25s ease;
}

.section h2 {
  display: inline-block;
  font-size: 2rem;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--primary);
}

.section h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.section h4 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section p,
.section ul {
  max-width: 900px;
  color: var(--text);
}

.section + .section {
  margin-top: 2rem;
}

/* ========================================
   Publication List
======================================== */

.publication-list {
  padding-left: 1.5rem;
  margin: 0;
}

.publication-item {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.publication-details {
  margin-top: 0.25rem;
  font-size: 0.95em;
  color: #666;
}

.publication-item a {
  text-decoration: none;
}

/* ========================================
   Utility
======================================== */

.content-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* ========================================
   Animation
======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Responsive: Tablet / Small Desktop
======================================== */

@media (max-width: 900px) {
  :root {
    --header-height: 140px;
    --nav-height: 56px;
  }

  .header-content {
    padding: 1rem 1.25rem;
  }

  .profile-section {
    gap: 1rem;
  }

  .profile-photo {
    width: 96px;
    height: 96px;
  }

  .profile-info h1 {
    font-size: 1.4rem;
  }

  .affiliation {
    font-size: 0.92rem;
  }

  .nav-link {
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
  }

  .main-content {
    padding:
      calc(var(--header-height) + var(--nav-height) + 1.5rem)
      1.25rem
      2rem;
  }

  .section h2 {
    font-size: 1.75rem;
  }
}

/* ========================================
   Responsive: Mobile
======================================== */

@media (max-width: 640px) {
  :root {
    --header-height: 128px;
    --nav-height: 104px;
  }

  .header-content {
    padding: 0.9rem 1rem;
  }

  .profile-section {
    align-items: flex-start;
    gap: 0.85rem;
  }

  .profile-photo {
    width: 78px;
    height: 78px;
    border-radius: 10px;
  }

  .profile-info h1 {
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
  }

  .affiliation {
    font-size: 0.86rem;
    line-height: 1.45;
  }

  .main-nav {
    justify-content: center;
  }

  .nav-link {
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
  }

  .main-content {
    padding:
      calc(var(--header-height) + var(--nav-height) + 1rem)
      1rem
      1.5rem;
  }

  .section {
    padding: 0.5rem 0 1.5rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .section h3 {
    font-size: 1.15rem;
  }

  .publication-item {
    padding: 1rem;
  }

  .publication-details {
    flex-direction: column;
    gap: 0.5rem;
  }
}