/* ==========================================================================
   ACADEMIC TYPOGRAPHY-FIRST STYLESHEET
   Style inspired by Ivy League / MIT / al-folio academic scholar pages.
   Zero gradients, zero shadows, zero emojis. Focus on prose, hierarchy & whitespace.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  --bg: #FAF9F5;
  --bg-subtle: #F2EFE9;
  --text: #1C1C1A;
  --text-secondary: #52514A;
  --text-muted: #78766E;
  --accent: #22344A;
  --accent-hover: #0E1D2D;
  --border: #E5E2D8;
  --border-subtle: #ECE9E1;
  --font-serif: 'Newsreader', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  --max-width: 680px;
  --line-height: 1.72;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: var(--line-height);
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.5rem 6rem 1.5rem;
}

/* Top Navigation */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 1.75rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav .nav-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.88rem;
  text-transform: lowercase;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Profile Header */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3.25rem;
}

.avatar-wrapper {
  flex-shrink: 0;
}

.profile-avatar {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  background-color: var(--bg-subtle);
}

.profile-details {
  flex: 1;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: 2.15rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.profile-title {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.86rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.profile-links a {
  color: var(--accent);
  text-decoration: none;
}

.profile-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent-hover);
}

.profile-links .sep {
  color: var(--border);
  user-select: none;
}

/* Prose & Typography */
p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

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

.bio-lead {
  font-family: var(--font-sans);
  font-size: 1.04rem;
  line-height: 1.75;
  color: var(--text);
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sections */
section {
  margin-bottom: 3.75rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 1.4rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}

/* Research Areas */
.research-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 1rem;
}

.research-item {
  font-size: 0.94rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
}

.research-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.research-item span {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  display: block;
}

/* Education / Experience Timeline */
.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timeline-institution {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.timeline-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  line-height: 1.55;
}

/* Publications */
.publication-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.publication-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.publication-title {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.publication-authors {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.publication-authors .author-self {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.publication-venue {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
  font-family: var(--font-serif);
}

.pub-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--bg-subtle);
  padding: 0.12rem 0.45rem;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.publication-links {
  display: flex;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

/* Projects */
.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.project-title a {
  color: var(--text);
  text-decoration: none;
}

.project-title a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.project-affiliation {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
}

.project-description {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.2rem;
}

.project-bullets {
  list-style: disc;
  margin-left: 1.2rem;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.project-stack {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.project-links {
  display: flex;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* Honors */
.honor-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.honor-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.94rem;
}

.honor-title {
  color: var(--text);
  font-weight: 500;
}

.honor-context {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
}

.honor-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Technical Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 0.75rem;
  column-gap: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

.skill-category {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}

.skill-items {
  color: var(--text);
}

/* Now / Notes */
.now-box {
  border-left: 2px solid var(--accent);
  padding: 0.6rem 1.15rem;
}

.now-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.now-box p:last-child {
  margin-bottom: 0;
}

.now-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.5rem;
}

/* Footer */
footer {
  margin-top: auto;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

footer a:hover {
  color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 620px) {
  .container {
    padding: 3rem 1.25rem 4rem 1.25rem;
  }

  .profile-header {
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
  }

  .profile-avatar {
    width: 84px;
    height: 84px;
  }

  .profile-name {
    font-size: 1.85rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    row-gap: 0.35rem;
  }

  .skill-category {
    margin-top: 0.5rem;
  }

  .site-nav {
    flex-direction: column;
    gap: 0.9rem;
  }

  .site-nav ul {
    gap: 1rem;
  }
}
