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

:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-200: #99f6e4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;

  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --bg: #ffffff;
  --bg-alt: var(--slate-50);
  --text: var(--slate-800);
  --text-muted: var(--slate-500);
  --accent: var(--teal-600);
  --accent-hover: var(--teal-700);
  --accent-light: var(--teal-50);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
  --transition: 0.3s ease;
  --radius: 12px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.7;
  font-size: 16px;
}

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

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

img {
  max-width: 100%;
  display: block;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  padding: 0 2rem;
}

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

.navbar-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--slate-900);
  letter-spacing: -0.02em;
}

.navbar-brand span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.navbar-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--slate-600);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--slate-700);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== Hero Section (Home page) ===== */
.hero {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 50%, var(--teal-600) 100%);
  color: #fff;
  padding: 5rem 2rem 4rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-photo {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 4px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo .placeholder-text {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
  padding: 1rem;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.hero-text .subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.hero-text .affiliation {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-bottom: 1.5rem;
}

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

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-links a:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ===== Page Header (non-home pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--teal-900) 0%, var(--teal-700) 100%);
  color: #fff;
  padding: 3rem 2rem 2.5rem;
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.page-header p {
  opacity: 0.8;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ===== Main Content ===== */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

/* ===== Section ===== */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  letter-spacing: -0.02em;
}

/* ===== Cards ===== */
.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--slate-100);
}

.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.card + .card {
  margin-top: 1rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-900);
}

.card .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  background: var(--slate-100);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
}

.card .institution {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

.card p {
  color: var(--slate-600);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

/* ===== Publication Card ===== */
.pub-card {
  border-left: 4px solid var(--accent);
}

.pub-card .pub-title {
  font-weight: 700;
  color: var(--slate-900);
  font-size: 1.05rem;
}

.pub-card .pub-authors {
  color: var(--slate-600);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.pub-card .pub-venue {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-style: italic;
  margin-top: 0.2rem;
}

.pub-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-top: 0.5rem;
}

.pub-badge.published {
  background: var(--teal-100);
  color: var(--teal-800);
}

.pub-badge.review {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Skills Grid ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.skill-category h4 {
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

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

.skill-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--accent-light);
  color: var(--teal-800);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.skill-tag:hover {
  background: var(--teal-100);
  transform: translateY(-1px);
}

/* ===== Languages ===== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.lang-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--slate-100);
}

.lang-item .lang-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--slate-900);
}

.lang-item .lang-level {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ===== References ===== */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.ref-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--slate-100);
  font-weight: 600;
  color: var(--slate-800);
}

.ref-item .ref-role {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ===== Bio Section ===== */
.bio-placeholder {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 2rem;
  border: 2px dashed var(--slate-300);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* ===== Footer ===== */
.footer {
  background: var(--slate-900);
  color: var(--slate-400);
  text-align: center;
  padding: 2rem;
  font-size: 0.88rem;
}

.footer a {
  color: var(--teal-400);
}

.footer a:hover {
  color: var(--teal-200);
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

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

  .hamburger {
    display: block;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

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

  .card-header {
    flex-direction: column;
    gap: 0.3rem;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

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

@media (max-width: 480px) {
  .hero-photo {
    width: 150px;
    height: 150px;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .main {
    padding: 1.5rem 1rem 3rem;
  }
}
