/* ============================================================
   PERSONAL WEBSITE STYLESHEET
   ============================================================ */

:root {
  /* --- Colors --- */
  --bg:           #ffffff;
  --bg-alt:       #f5f5f7;
  --text:         #1d1d1f;
  --text-secondary: #6e6e73;
  --border:       #d2d2d7;
  --accent:       #0071e3;        /* swap to any color you like */
  --accent-hover: #0077ed;
  --tag-bg:       #e8f0fe;
  --tag-text:     #1a56db;

  /* --- Typography --- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display",
                  "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Fira Code", monospace;

  /* --- Layout --- */
  --max-width:    860px;
  --section-gap:  5rem;
  --radius:       12px;
  --radius-sm:    8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Utility */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.25s ease;
}
.nav-name:hover { text-decoration: none; color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 5rem 0 1rem;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
}

/* Profile photo — replace src in HTML */
.hero-photo {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-alt);   /* fallback while photo loads */
  border: 1px solid var(--border);
}

.hero-text {
  flex: 1;
  padding-top: 0.25rem;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.hero-affiliation {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Pill links: Email, CV, Scholar, Github … */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 980px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pill:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  text-decoration: none;
}

.pill svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }

/* Sections */
section { padding: var(--section-gap) 0; }

section + section {
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

/* About */
.about-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  max-width: 680px;
}

.about-text p + p { margin-top: 1rem; }

/* Research interests tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  border-radius: 980px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 13px;
  font-weight: 500;
}

/* News */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.news-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  align-items: baseline;
}

.news-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.news-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

/* Publications / Projects */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pub-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pub-thumb {
  border-radius: var(--radius-sm);
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 100%;
}

.pub-body {}

.pub-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.pub-authors {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.pub-venue {
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding: 0.15rem 0;
}
.pub-link::after { content: " →"; }
.pub-link:hover { text-decoration: underline; }

/* Separator between pub links */
.pub-links .sep {
  color: var(--border);
  font-size: 13px;
  user-select: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-email {
  font-size: 13px;
}

/* Project Page */
.project-hero {
  padding: 3.5rem 0 3rem;
}

.project-venue {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.project-authors {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-authors strong {
  color: var(--text);
  font-weight: 600;
}

.teaser {
  margin-top: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.teaser img {
  width: 100%;
  display: block;
}

.teaser-caption {
  background: var(--bg-alt);
  padding: 0.85rem 1.25rem;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Abstract */
.abstract-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  max-width: 680px;
}

/* Method / Results blocks */
.content-block { max-width: 720px; }

.content-block p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.content-block h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* Result figure grid */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.figure-item img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
}

.figure-caption {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 0.4rem;
  line-height: 1.45;
}

/* BibTeX */
.bibtex-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.bibtex-block pre {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
}

/* Responsive */
@media (max-width: 640px) {
  .hero-inner    { flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
  .hero-links    { justify-content: center; }
  .tags          { justify-content: center; }
  .pub-card      { grid-template-columns: 1fr; }
  .pub-thumb     { max-width: 240px; }
  .news-item     { grid-template-columns: 1fr; gap: 0.15rem; }
  .footer-inner  { flex-direction: column; text-align: center; }

  .project-authors { font-size: 15px; }
  .figure-grid   { grid-template-columns: 1fr 1fr; }
}
