/* === Variables === */
:root {
  --accent-red: #E42313;
  --bg-dark: #0D0D0D;
  --bg-light: #FAFAFA;
  --bg-white: #FFFFFF;
  --border-gray: #E8E8E8;
  --success-green: #22C55E;
  --text-muted: #B0B0B0;
  --text-primary: #0D0D0D;
  --text-secondary: #7A7A7A;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Inline Markdown links generated by md_inline() */
.md-link {
  color: var(--accent-red);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.md-link:hover {
  text-decoration-color: var(--accent-red);
}

/* === Header === */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 120px;
  background: var(--bg-white);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo .accent-bar {
  width: 4px;
  height: 24px;
  background: var(--accent-red);
}

.header-logo span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.header-nav a:first-child {
  color: var(--text-primary);
}

.header-nav a:hover {
  color: var(--text-primary);
}

.header-border {
  width: 100%;
  height: 1px;
  background: var(--border-gray);
}

/* === Hero Section === */
.hero {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 56px 120px;
  background: var(--bg-light);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-badge .bar {
  width: 32px;
  height: 2px;
  background: var(--accent-red);
}

.hero-badge span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-red);
  letter-spacing: 1px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 12px;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--bg-dark);
  color: var(--bg-white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-gray);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-light);
}

.hero-photo {
  width: 300px;
  height: 370px;
  background: var(--bg-light);
  border: 1px solid var(--border-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.hero-photo i {
  color: #D0D0D0;
  font-size: 48px;
}

.hero-photo span {
  font-size: 13px;
  color: #D0D0D0;
}

/* === Section Headings (shared) === */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header .accent-bar {
  width: 4px;
  height: 20px;
  background: var(--accent-red);
}

.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
}

/* === About Section === */
.about {
  padding: 56px 120px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-content {
  display: flex;
  gap: 40px;
}

.about-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-left p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-right {
  width: 420px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-right h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edu-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.edu-item .degree {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.edu-item .school {
  font-size: 14px;
  color: var(--text-secondary);
}

.edu-item .year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-red);
}

.about-divider {
  width: 100%;
  height: 1px;
  background: var(--border-gray);
}

.exp-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.exp-item .role {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.exp-item .place {
  font-size: 14px;
  color: var(--text-secondary);
}

.exp-item .year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-red);
}

/* === Section border === */
.section-border {
  width: 100%;
  height: 1px;
  background: var(--border-gray);
}

/* === Research Section === */
.research {
  padding: 56px 120px;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.research .section-header h2 {
  color: var(--bg-white);
}

.research-desc {
  font-size: 16px;
  color: #B0B0B0;
  line-height: 1.7;
  max-width: 600px;
}

.research-grid {
  display: flex;
  gap: 16px;
}

.research-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid #333333;
}

.research-card i {
  color: var(--accent-red);
  font-size: 28px;
}

.research-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--bg-white);
  line-height: 1.3;
}

.research-card p {
  font-size: 14px;
  color: #B0B0B0;
  line-height: 1.6;
}

/* === Publications Section === */
.publications {
  padding: 56px 120px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-view-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-gray);
}

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

.pub-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-red);
  flex-shrink: 0;
}

.pub-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.pub-content .pub-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.pub-content .pub-authors {
  font-size: 14px;
  color: var(--text-secondary);
}

.pub-content .pub-venue {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
}

/* === Projects Section === */
.projects {
  padding: 56px 120px;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.projects-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.projects-grid {
  display: flex;
  gap: 16px;
}

.project-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--bg-white);
  border: 1px solid var(--border-gray);
}

.project-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-status i {
  color: var(--accent-red);
  font-size: 24px;
}

.badge-active {
  padding: 4px 10px;
  background: #E8F5E9;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #2E7D32;
}

.badge-completed {
  padding: 4px 10px;
  background: #FFF3E0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #E65100;
}

.project-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-meta .fund {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-red);
}

.project-meta .period {
  font-size: 12px;
  color: var(--text-muted);
}

/* === Courses Section === */
.courses {
  padding: 56px 120px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.courses-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

.courses-grid {
  display: flex;
  gap: 16px;
}

.course-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border-gray);
}

.course-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-top i {
  color: var(--accent-red);
  font-size: 24px;
}

.course-top .semester {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.course-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.course-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.course-link:hover {
  color: var(--accent-red);
}

.course-link i {
  font-size: 14px;
}

.course-card .course-code {
  font-size: 13px;
  color: var(--text-secondary);
}

.course-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Footer === */
.footer {
  display: flex;
  gap: 48px;
  padding: 40px 120px;
  background: var(--bg-white);
}

.footer-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo .accent-bar {
  width: 4px;
  height: 20px;
  background: var(--accent-red);
}

.footer-logo span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-left .address {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-email i {
  color: var(--text-secondary);
  font-size: 16px;
}

.footer-email span {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-col {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-primary);
}

/* === Copyright Bar === */
.copyright {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 120px;
  background: var(--bg-light);
}

.copyright span {
  font-size: 12px;
  color: var(--text-muted);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .header,
  .hero,
  .about,
  .research,
  .publications,
  .projects,
  .courses,
  .footer,
  .copyright {
    padding-left: 48px;
    padding-right: 48px;
  }

  .hero {
    flex-direction: column;
  }

  .hero-photo {
    width: 100%;
    height: 300px;
  }

  .about-content {
    flex-direction: column;
  }

  .about-right {
    width: 100%;
  }

  .research-grid,
  .projects-grid,
  .courses-grid {
    flex-wrap: wrap;
  }

  .research-card,
  .project-card,
  .course-card {
    flex: 1 1 calc(50% - 12px);
  }

  .footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px 24px;
  }

  .header-nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .hero,
  .about,
  .research,
  .publications,
  .projects,
  .courses,
  .footer,
  .copyright {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-title {
    font-size: 32px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .research-card,
  .project-card,
  .course-card {
    flex: 1 1 100%;
  }

  .footer {
    flex-direction: column;
  }

  .footer-col {
    width: 100%;
  }
}
