/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --bg: #f6f7f8;
  --surface: #edeef1;
  --surface-2: #e3e5ea;
  --border: #d4d6dd;
  --border-hover: #b2b6c0;
  --text: #16181e;
  --muted: #5f6370;
  --muted-2: #969caa;
  --accent: #2d52d4;
  --accent-glow: rgba(45, 82, 212, 0.12);
  --accent-hover: #1e3eb8;
  --green: #1a7a46;
  --heading-font: 'Geist', sans-serif;
  --body-font: 'Geist', sans-serif;
  --mono-font: 'Geist Mono', monospace;
  --max-width: 880px;
  --header-height: 60px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(246, 247, 248, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.site-name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-name:hover { color: var(--accent-hover); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.site-nav a svg { flex-shrink: 0; opacity: 0.7; }
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   Main
   ============================================================ */
main { padding-top: var(--header-height); min-height: calc(100vh - 100px); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 48px;
}

.hero-banner {
  width: 100%;
  height: 220px;
  background-image: url('/images/hero-bg.png');
  background-size: cover;
  background-position: center 40%;
}

.hero-profile-row {
  display: flex;
  align-items: flex-end;
  padding: 0 24px;
  margin-top: -48px;
  margin-bottom: 16px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  margin-top: -48px;
}

.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
}

.hero-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.hero-inner {
  position: relative;
  animation: fadeUp 0.6s ease both;
}

.hero-text h1 {
  font-family: var(--heading-font);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text) 50%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-family: var(--mono-font);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.hero-bio {
  font-size: 1rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-family: var(--mono-font);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px;
}
.hero-badge svg { opacity: 0.6; }

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.1s;
}
.section:last-child { border-bottom: none; }

.section-label {
  font-family: var(--mono-font);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   Cards
   ============================================================ */
.talks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}

.talk-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.talk-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
}

.talk-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 0 0 1px var(--border-hover);
  color: var(--text);
}
.talk-card:hover::before { opacity: 1; }

.talk-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.talk-info {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.talk-info h3 {
  font-family: var(--body-font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
}

.talk-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.talk-source {
  font-size: 0.75rem;
  color: var(--muted);
}

.talk-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-family: var(--mono-font);
  color: var(--accent);
  background: rgba(108,142,245,0.1);
  border: 1px solid rgba(108,142,245,0.2);
  border-radius: 4px;
  padding: 1px 6px;
}
.talk-badge svg { width: 10px; height: 10px; }
.talk-badge.green {
  color: var(--green);
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.2);
}
.talk-badge.red {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(45,82,212,0.2);
}
.talk-badge.orange {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: rgba(45,82,212,0.2);
}

/* ============================================================
   Skills
   ============================================================ */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-family: var(--body-font);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.skill-chip:hover { border-color: var(--border-hover); color: var(--text); }
.skill-chip svg { opacity: 0.5; flex-shrink: 0; }

/* ============================================================
   Topic label
   ============================================================ */
.talks-topic-label {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 14px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.talks-topic-label::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.6;
}

/* ============================================================
   About page — Current Role
   ============================================================ */
.current-role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

.current-role-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.brand-logo-link:hover { opacity: 0.75; }

.langchain-logo {
  height: 28px;
  width: auto;
}

.langsmith-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.langsmith-wordmark {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.brand-logo-divider {
  color: var(--border);
  font-size: 1.1rem;
}

.current-role-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.current-role-title {
  font-family: var(--heading-font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.current-role-dates {
  font-family: var(--mono-font);
  font-size: 0.8rem;
  color: var(--muted-2);
  margin-top: 3px;
}

.current-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--mono-font);
  color: var(--green);
  background: rgba(15, 122, 66, 0.08);
  border: 1px solid rgba(15, 122, 66, 0.2);
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}

.current-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.current-role-desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 680px;
}

.current-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}
.about-card:hover { border-color: var(--border-hover); }

.about-card-icon {
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent);
}

.about-card h3 {
  font-family: var(--heading-font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================
   Resume
   ============================================================ */
.resume-header {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.5s ease both;
}

.resume-header h1 {
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text) 50%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.resume-header .tagline {
  font-family: var(--mono-font);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.resume-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.resume-meta a { color: var(--muted); }
.resume-meta a:hover { color: var(--accent); }
.resume-meta span, .resume-meta a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.resume-body { padding: 48px 0; }

.resume-section { margin-bottom: 56px; }

.resume-section-title {
  font-family: var(--mono-font);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.resume-section-title svg { opacity: 0.5; }

.job {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.job:last-child { border-bottom: none; padding-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.job-company-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--surface-2);
  padding: 4px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  image-rendering: -webkit-optimize-contrast;
}

.job-logo-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted-2);
}

.job-company {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.job-dates {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--muted-2);
  white-space: nowrap;
}

.job-title {
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 400;
}

.job ul { list-style: none; padding: 0; margin: 0 0 12px; }

.job ul li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 3px 0 3px 16px;
  position: relative;
  line-height: 1.65;
}
.job ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

.job-env {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--muted-2);
  margin-top: 10px;
}
.job-env strong { color: var(--muted); font-weight: 500; }

.edu-entry { margin-bottom: 24px; }
.edu-entry:last-child { margin-bottom: 0; }
.edu-school { font-family: var(--heading-font); font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.edu-degree { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.edu-year { font-family: var(--mono-font); font-size: 0.75rem; color: var(--muted-2); margin-top: 2px; }

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

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

.site-footer #my-email a, .site-footer p {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--mono-font);
}
.site-footer a { color: var(--muted); transition: color 0.15s; }
.site-footer a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
}

/* ============================================================
   Blog
   ============================================================ */
.post-list { list-style: none; padding: 0; }
.post-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.post-list li:last-child { border-bottom: none; }
.post-date {
  font-family: var(--mono-font);
  font-size: 0.75rem;
  color: var(--muted-2);
  white-space: nowrap;
  min-width: 100px;
}

/* ============================================================
   404
   ============================================================ */
.not-found { padding: 120px 0; text-align: center; }
.not-found h1 {
  font-family: var(--heading-font);
  font-size: 5rem;
  font-weight: 700;
  color: var(--border);
  margin-bottom: 16px;
}
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 20px; width: 100%; border-radius: 0; }

  .hero-banner { height: 150px; }
  .hero-photo { width: 76px; height: 76px; }
  .hero-text h1 { font-size: 1.75rem; }

  .job-header { flex-direction: column; gap: 2px; }
  .resume-meta { flex-direction: column; gap: 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
