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

:root {
  --text-primary: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --border: #eee;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / Navigation */
header {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-image {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.hero-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.hero-content a {
  color: var(--accent);
  text-decoration: none;
}

.hero-content a:hover {
  text-decoration: underline;
}

/* Main Content */
main {
  padding: 60px 0 100px;
}

/* Page Header */
.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Sections */
section {
  margin-bottom: 56px;
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  padding-left: 0;
  list-style-position: inside;
}

li {
  margin-bottom: 8px;
}

/* Research Items */
.research-item {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.research-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.research-item h3 {
  font-size: 1.05rem;
  font-weight: 500;
}

.research-item h3 a {
  color: var(--text-primary);
}

.research-item h3 a:hover {
  color: var(--accent);
}

.research-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

.research-meta .coauthors {
  color: var(--text-muted);
}

.research-award {
  font-size: 0.85rem;
  color: var(--accent);
  font-style: italic;
  margin-top: 4px;
}

/* Writing Items */
.writing-list {
  list-style: none;
}

.writing-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.writing-item:last-child {
  border-bottom: none;
}

.writing-item a {
  color: var(--text-primary);
  font-size: 1rem;
}

.writing-item a:hover {
  color: var(--accent);
}

.writing-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
}

/* Collapsible Sections */
details {
  margin-bottom: 32px;
}

summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: '+ ';
}

details[open] summary::before {
  content: '- ';
}

/* Research Abstract Toggle */
.abstract-toggle {
  margin-top: 8px;
  margin-bottom: 0;
}

.abstract-toggle summary {
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.abstract-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

/* About Sections */
.about-section {
  margin-bottom: 40px;
}

.about-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.about-section p,
.about-section li {
  color: var(--text-secondary);
}

/* Interests List */
.interests-list {
  list-style: none;
  padding-left: 0;
  margin-top: 16px;
}

.interests-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 20px;
  line-height: 1.7;
}

.interests-list li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.interests-list li strong {
  color: var(--text-primary);
}

/* Misc/Projects Grid */
.project-item {
  margin-bottom: 24px;
}

.project-item h3 {
  font-size: 1rem;
}

.project-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 4px;
}

/* Teaching */
.teaching-category {
  margin-bottom: 20px;
}

.teaching-category h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.teaching-category ul {
  list-style: none;
  padding-left: 0;
}

.teaching-category li {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.social-links a:hover {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 48px 0;
  }

  .hero-image {
    width: 140px;
    height: 140px;
  }

  .nav-links {
    gap: 20px;
  }

  .writing-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .writing-date {
    margin-left: 0;
  }
}
