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

:root {
  --bg: #ffffff;
  --bg2: #f7f8fa;
  --border: #e5e7eb;
  --text: #111111;
  --text2: #555555;
  --accent: #0066cc;
  --chip-bg: #f0f2f5;
  --chip-text: #374151;
  --radius: 8px;
  --max: 1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== NAV ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-right: 8px;
}
.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.nav-links a {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); text-decoration: none; }

.btn-pdf {
  margin-left: 20px;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-pdf:hover { background: #0055aa; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 52px 24px 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #fff3f0;
  border: 1px solid #fbbfb3;
  font-size: 12px;
  font-weight: 600;
  color: #c0392b;
  width: fit-content;
}
.badge::before { content: '\2022'; color: #e74c3c; }

.hero-name {
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
}
.hero-name .accent {
  color: var(--accent);
  display: block;
}
.hero-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text2);
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}
.hero-sub {
  font-size: 14px;
  color: var(--text2);
  max-width: 460px;
  line-height: 1.65;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.btn-primary {
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: #0055aa; text-decoration: none; }
.btn-ghost {
  padding: 10px 22px;
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ===== FEATURED VIDEO CARD ===== */
.featured-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.featured-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.video-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.featured-title { font-size: 14px; font-weight: 600; color: var(--text); }
.featured-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== STATS ===== */
.stats-row {
  display: flex;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat {
  flex: 1;
  padding: 20px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-number {
  font-size: 40px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -2px;
}
.stat-plus {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
}
.stat p {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 3px;
}

/* ===== CONTENT GRID ===== */
.content-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 48px;
}
.block { margin-bottom: 32px; }
.block:last-child { margin-bottom: 0; }
.block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ===== ABOUT ===== */
.block > p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
}

/* ===== EXPERIENCE ===== */
.exp-list { display: flex; flex-direction: column; gap: 14px; }
.exp-item {
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.exp-role { font-size: 14px; font-weight: 700; color: var(--text); }
.exp-date { font-size: 12px; color: var(--text2); font-weight: 500; white-space: nowrap; }
.exp-desc { font-size: 13px; color: var(--text2); margin-bottom: 8px; line-height: 1.6; }
.exp-chips { display: flex; flex-wrap: wrap; gap: 5px; }

/* ===== CHIPS ===== */
.chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.chip.sm { padding: 2px 8px; font-size: 11px; }

/* ===== SKILLS ===== */
.skills-wrap { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== TALKS ===== */
.talks-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.talks-list li {
  padding: 9px 12px;
  border-left: 3px solid var(--accent);
  background: var(--bg2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.talk-title { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.talks-list a { text-decoration: none; }
.talks-list a .talk-title { color: var(--accent); }
.talks-list a:hover .talk-title { text-decoration: underline; }
.talk-venue { display: block; font-size: 12px; color: var(--text2); margin-top: 2px; }
.link-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* ===== ARTICLES ===== */
.articles-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 24px 48px;
}
.articles-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.section-heading a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.section-heading a:hover { text-decoration: underline; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.15s;
  color: var(--text);
}
.article-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-thumb {
  position: relative;
  padding-top: 52%;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
}
.article-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-tag {
  position: absolute;
  bottom: 8px;
  left: 10px;
  padding: 3px 9px;
  background: rgba(0, 102, 204, 0.88);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}
.article-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.article-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  margin: 0;
}
.article-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}
.articles-footer {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 900px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .articles-grid { grid-template-columns: 1fr; }
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-name { font-size: 15px; font-weight: 700; color: var(--text); }
.footer-role { font-size: 13px; color: var(--text2); margin-top: 3px; }
.footer-community { font-size: 12px; color: var(--text2); margin-top: 4px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.footer-links a { font-size: 13px; color: var(--text2); font-weight: 500; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

/* ===== MOBILE ===== */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; gap: 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 54px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
    z-index: 99;
  }
  .nav-toggle { display: flex; margin-left: auto; }
  .btn-pdf { margin-left: 8px; padding: 6px 12px; font-size: 12px; }
}

/* ===== PRINT / PDF ===== */
@media print {
  #navbar, .btn-pdf { display: none !important; }
  .hero-right, .video-wrap, .featured-card { display: none !important; }
  .hero-inner { grid-template-columns: 1fr !important; }
  .content-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .hero { padding: 16px 0 12px !important; }
  .content-grid { padding: 12px 0 !important; }
  footer { padding: 12px 0 !important; background: none !important; }
  .stats-row { margin-top: 12px !important; }
  .exp-item { background: none !important; border: 1px solid #ddd !important; border-left: 3px solid #0066cc !important; }
  .chip { background: none !important; border: 1px solid #ddd !important; }
  .talks-list li { background: none !important; }
  .articles-section { background: none !important; border-top: 1px solid #ddd !important; }
  .articles-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }
  .article-thumb { display: none !important; }
  .article-card { border: 1px solid #ddd !important; box-shadow: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm 12mm; size: A4; }
}
