/* ============================================================
   MINIMAL ACADEMIC PORTFOLIO — CSS
   Typography: Inter | Palette: Monochromatic + Electric Blue
   ============================================================ */

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

:root {
  /* Colors */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #f1f3f5;
  --border: #e5e7eb;
  --text-tertiary: #9ca3af;
  --text-secondary: #6b7280;
  --text-primary: #1f2937;
  --text-heading: #111827;
  --charcoal: #0f172a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-muted: rgba(37, 99, 235, 0.15);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --nav-height: 64px;
  --container-width: 1120px;
  --container-narrow: 780px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Sticky Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow .3s;
}

.nav.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  transition: color .2s;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all .3s;
}

/* ---------- Hero Section (Homepage) ---------- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.hero-text {
  max-width: 560px;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-heading {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-subheading {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-photo-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.hero-photo {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-light);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.1);
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- News Section (Homepage right column) ---------- */
.hero-news {
  margin-top: 2rem;
  width: 100%;
  max-width: 360px;
}

.hero-news-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  padding: 0.4rem 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.news-date {
  font-weight: 700;
  color: var(--text-primary);
}

.news-item a {
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

/* ---------- Section Layout ---------- */
.section {
  padding: 6rem 0;
}

.section--gray {
  background: var(--off-white);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Featured Publication Card (Homepage) ---------- */
.featured-pub {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.5rem;
  margin-top: 3rem;
  transition: box-shadow .3s, border-color .3s;
}

.featured-pub:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

.featured-pub-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.featured-pub-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.featured-pub-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.featured-pub-meta a {
  font-weight: 500;
}

/* ---------- Research Grid ---------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.research-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  cursor: pointer;
}

.research-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.research-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.research-card-body {
  padding: 1.5rem;
}

.research-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.research-card-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.research-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
}

/* Research card expandable detail */
.research-detail {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.research-detail.open {
  display: block;
}

.research-detail h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 1.25rem 0 0.5rem;
}

.research-detail p,
.research-detail li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.research-detail ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.research-detail ul li {
  margin-bottom: 0.5rem;
}

.research-detail-pubs {
  margin-top: 1rem;
}

.research-detail-pubs a {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Publications ---------- */
.pub-year-group {
  margin-bottom: 3rem;
}

.pub-year-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.pub-list {
  list-style: none;
}

.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}

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

.pub-item:hover {
  background: var(--accent-light);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 6px;
}

.pub-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.5;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.pub-title:hover {
  color: var(--accent);
}

.pub-authors {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.pub-venue {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  font-style: italic;
}

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

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  transition: all .2s;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.pub-link:hover {
  background: var(--accent);
  color: var(--white);
}

/* Publication Expanded Details */
.pub-abstract {
  display: none;
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pub-abstract.open {
  display: block;
}

/* BibTeX */
.bibtex-container {
  display: none;
  margin-top: 0.75rem;
  background: var(--charcoal);
  border-radius: 6px;
  padding: 1.25rem;
  position: relative;
}

.bibtex-container.open {
  display: block;
}

.bibtex-code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
  margin: 0;
}

.copy-bibtex {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
}

.copy-bibtex:hover {
  background: var(--accent);
  color: var(--white);
}

/* Tag Filter Bar */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.tag-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
}

.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ---------- About Page ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-photo-col {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.about-photo {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.about-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--off-white);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all .25s;
  border: 1px solid var(--border);
}

.social-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.about-text h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.about-text h2:first-child {
  margin-top: 0;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-weight: 300;
  line-height: 1.8;
}

.about-text ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.about-text li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
  line-height: 1.7;
}

.about-text li strong {
  color: var(--text-primary);
  font-weight: 500;
}

.cv-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* ---------- Contact Row (inside About) ---------- */
.contact-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.contact-card {
  flex: 1;
  min-width: 200px;
  padding: 1.25rem;
  background: var(--off-white);
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.contact-card i {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0;
}

.contact-card a {
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--off-white);
}

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

/* ---------- Scroll‐reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1  { margin-top: 0.5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mt-4  { margin-top: 2rem; }
.mb-4  { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-text {
    max-width: 100%;
    order: 2;
  }

  .hero-photo-wrapper {
    order: 1;
  }

  .hero-photo {
    width: 220px;
    height: 220px;
  }

  .hero-cta {
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-photo-col {
    position: static;
    text-align: center;
  }

  .about-photo {
    width: 220px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
  }

  .research-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 2rem);
    padding-bottom: 2rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .container,
  .container--narrow {
    padding: 0 1.25rem;
  }
}

/* ---------- Pub venue type badges ---------- */
.venue-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.venue-badge--journal {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.venue-badge--conference {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.venue-badge--workshop {
  background: rgba(246, 128, 59, 0.1);
  color: #eb5325;
}

.venue-badge--preprint {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.venue-badge--thesis {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

/* ---------- Highlight current author ---------- */
.author-highlight {
  font-weight: 600;
  color: var(--text-heading);
}

/* ---------- Research Focus Chips (Homepage) ---------- */
.focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
  justify-content: flex-start;
}

.focus-chip {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent-muted);
}

@media (max-width: 900px) {
  .focus-chips {
    justify-content: center;
  }
}

/* ---------- Blockquote (Dieter Rams quote) ---------- */
blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* ---------- Media thumbnails for research cards ---------- */
.research-card-media {
  position: relative;
  overflow: hidden;
  height: 200px;
  background: var(--light-gray);
}

.research-card-media img,
.research-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.research-card:hover .research-card-media img,
.research-card:hover .research-card-media video {
  transform: scale(1.03);
}
