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

:root {
  --bg: #0d0d0d;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --border: #222;
  --text: #e0e0e0;
  --text-muted: #777;
  --accent: #c8b8a2;
  --accent2: #a09080;
  --white: #f5f5f5;
  --nav-bg: rgba(13, 13, 13, 0.88);
  --nav-mobile-bg: rgba(13, 13, 13, 0.96);
  --card-shadow: rgba(0, 0, 0, 0.2);
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-h: 56px;
  --radius: 10px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
  --bg: #f8f7f4;
  --bg2: #ffffff;
  --bg3: #eeece8;
  --border: #ddd8d0;
  --text: #3a3632;
  --text-muted: #7a756e;
  --accent: #8a7560;
  --accent2: #6e5d4d;
  --white: #1a1714;
  --nav-bg: rgba(248, 247, 244, 0.92);
  --nav-mobile-bg: rgba(248, 247, 244, 0.97);
  --card-shadow: rgba(0, 0, 0, 0.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 100px 0; }

.section-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

/* ===== Navigation ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--white);
  border-color: var(--accent2);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }

[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-h) 32px 0;
  max-width: 1100px;
  margin: 0 auto;
  gap: 56px;
  position: relative;
}

.hero-content { flex: 1; }

.hero-eyebrow {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 20px;
  white-space: nowrap;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--white);
  border-color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--white);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 12px;
  margin-top: 16px;
}

/* ===== Hero Social ===== */
.hero-social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-btn:hover {
  color: var(--white);
  border-color: var(--accent2);
  transform: translateY(-2px);
}

/* ===== Hero Visual ===== */
.hero-visual {
  flex: 0 0 300px;
  display: flex;
  justify-content: center;
}

.hero-avatar {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ===== Scroll Hint ===== */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.5;
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ===== About ===== */
.about { background: var(--bg2); }

.about-header {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}

.about-heading h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-top: 4px;
}

.about-bio p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
  text-align: justify;
}

.about-bio p:last-child { margin-bottom: 0; }

.about-bio a {
  color: var(--accent);
  border-bottom: 1px solid rgba(200, 184, 162, 0.3);
  transition: border-color var(--transition);
}

.about-bio a:hover { border-color: var(--accent); }

/* Divider */
.about-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ===== Awards ===== */
.awards-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.awards-row::-webkit-scrollbar {
  height: 3px;
}

.awards-row::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 3px;
}

.awards-row::-webkit-scrollbar-thumb {
  background: var(--accent2);
  border-radius: 3px;
}

.award-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
  flex-shrink: 0;
  scroll-snap-align: start;
  white-space: nowrap;
}

.award-item:hover { border-color: var(--accent2); }

.award-shipped {
  border-color: rgba(200, 184, 162, 0.3);
}

.award-shipped .award-icon {
  color: #ff6b35;
}

.award-icon {
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
}

.award-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
}

.award-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== Detail Cards ===== */
.about-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.detail-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.detail-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
  font-weight: 600;
}

.detail-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

/* ===== About Footer ===== */
.about-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.tag {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.affiliations-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.affiliation-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
}

.affiliation-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--card-shadow);
}

.affiliation-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-light { display: none; }
[data-theme="light"] .logo-dark { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* ===== Research ===== */
.research h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--white);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent2);
  box-shadow: 0 8px 24px var(--card-shadow);
}

.project-image {
  height: 180px;
  overflow: hidden;
  background: var(--bg3);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.04);
}

.project-body { padding: 22px; }

.project-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.tag-sm {
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.project-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--white);
  line-height: 1.3;
}

.project-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.project-link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.project-link:hover { color: var(--white); }

/* ===== Publications ===== */
.publications { background: var(--bg2); }

.publications h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--white);
}

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

.pub-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-year {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 3px;
  letter-spacing: 0.06em;
}

.pub-venue {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 600;
}

.pub-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 6px;
}

.pub-content h4 a {
  color: var(--white);
  transition: color var(--transition);
}

.pub-content h4 a:hover { color: var(--accent); }

.pub-authors {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pub-footer {
  margin-top: 36px;
  text-align: center;
}

.pub-badge {
  display: inline-block;
  background: rgba(200, 184, 162, 0.12);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid rgba(200, 184, 162, 0.25);
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  font-weight: 600;
}

.pub-links {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.pub-links a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), color var(--transition);
  padding-bottom: 1px;
}

.pub-links a:hover {
  color: var(--white);
  border-color: var(--white);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
}

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

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-social a:hover { color: var(--white); }

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

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: calc(var(--nav-h) + 32px);
    min-height: unset;
    padding-bottom: 64px;
  }
  .hero-visual { flex: unset; }
  .hero-actions { justify-content: center; }
  .hero-social { justify-content: center; }
  .hero-scroll-hint { display: none; }
  .about-header { grid-template-columns: 1fr; gap: 24px; }
  .about-details-grid { grid-template-columns: 1fr; }
  .about-footer { flex-direction: column; align-items: flex-start; }
  .projects-grid { grid-template-columns: 1fr; }
  .detail-body { white-space: normal; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    gap: 16px;
  }
  .nav-toggle { display: block; }
  .pub-item { grid-template-columns: 1fr; gap: 6px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}
