:root {
  --bg: #111316;
  --surface: #181B20;
  --surface-2: #1F2228;
  --border: #2A2E36;
  --text: #E4E5E7;
  --text-dim: #878B94;
  --accent: #5BA8A0;
  --accent-glow: rgba(91, 168, 160, 0.12);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Outfit', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ── Navigation ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  background: rgba(17, 19, 22, 0.85);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s;
}
nav.scrolled { border-bottom-color: var(--border); }
.nav-mark {
  font-family: var(--serif); font-size: 1.25rem; color: var(--accent);
  letter-spacing: 0.02em; text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; transition: color 0.3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

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

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 0 3rem; position: relative;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6rem;
  max-width: 1280px; margin: 0 auto; width: 100%; align-items: center;
}
.hero-content { z-index: 2; }
.hero-label {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1.5rem;
  opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 1.8rem; opacity: 0; animation: fadeUp 0.8s 0.4s forwards;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc {
  font-size: 1.05rem; color: var(--text-dim); max-width: 480px;
  margin-bottom: 2.5rem; opacity: 0; animation: fadeUp 0.8s 0.6s forwards;
}
.hero-cta { display: flex; gap: 1rem; opacity: 0; animation: fadeUp 0.8s 0.8s forwards; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; font-family: var(--sans); font-size: 0.82rem;
  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; transition: all 0.3s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { box-shadow: 0 0 30px var(--accent-glow), 0 4px 20px rgba(0,0,0,0.3); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--text); }

/* Hero visual */
.hero-visual { position: relative; height: 480px; opacity: 0; animation: fadeIn 1.2s 0.6s forwards; }
.arch-ring { position: absolute; border: 1px solid var(--border); border-radius: 50%; animation: rotate 30s linear infinite; }
.arch-ring:nth-child(1) { width: 420px; height: 420px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.arch-ring:nth-child(2) { width: 320px; height: 320px; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-direction: reverse; animation-duration: 25s; border-color: rgba(91, 168, 160, 0.15); }
.arch-ring:nth-child(3) { width: 200px; height: 200px; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-duration: 20s; }
.arch-dot { position: absolute; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 20px var(--accent-glow); }
.arch-dot:nth-child(4) { top: 12%; left: 52%; }
.arch-dot:nth-child(5) { top: 50%; right: 8%; }
.arch-dot:nth-child(6) { bottom: 20%; left: 30%; }
.arch-line { position: absolute; background: linear-gradient(to bottom, transparent, var(--border), transparent); width: 1px; }
.arch-line:nth-child(7) { height: 200px; top: 15%; left: 35%; }
.arch-line:nth-child(8) { height: 150px; bottom: 10%; right: 35%; }

/* ── Sections ── */
section { padding: 7rem 3rem; max-width: 1280px; margin: 0 auto; }
.section-header { display: flex; align-items: baseline; gap: 1.5rem; margin-bottom: 4rem; }
.section-num { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.section-title { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 400; }
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.about-text p { color: var(--text-dim); margin-bottom: 1.5rem; font-size: 1.02rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.stat {
  padding: 2rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; transition: border-color 0.3s, transform 0.3s;
}
.stat:hover { border-color: rgba(91, 168, 160, 0.3); transform: translateY(-2px); }
.stat-value { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); margin-bottom: 0.5rem; }
.stat-label { font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Expertise ── */
.expertise-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.expertise-card {
  padding: 2.5rem 2rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; position: relative; overflow: hidden; transition: all 0.4s;
}
.expertise-card:hover { border-color: rgba(91, 168, 160, 0.3); transform: translateY(-3px); box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.expertise-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.4s;
}
.expertise-card:hover::before { opacity: 1; }
.expertise-icon { font-size: 1.6rem; margin-bottom: 1.2rem; display: block; }
.expertise-card h3 { font-family: var(--sans); font-size: 1rem; font-weight: 500; margin-bottom: 0.8rem; }
.expertise-card p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 3rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--border), transparent);
}
.timeline-item { position: relative; padding-bottom: 3rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -3rem; top: 0.5rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow); transform: translateX(-3px);
}
.timeline-period { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.timeline-role { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.3rem; }
.timeline-company { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.8rem; }
.timeline-desc { font-size: 0.88rem; color: var(--text-dim); max-width: 580px; line-height: 1.65; }

/* ── Speaking ── */
.speaking-list { display: flex; flex-direction: column; gap: 1.5rem; }
.speaking-card {
  padding: 2.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; display: grid; grid-template-columns: auto 1fr;
  gap: 2rem; align-items: start; transition: border-color 0.3s;
}
.speaking-card:hover { border-color: rgba(91, 168, 160, 0.3); }
.speaking-icon {
  width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--accent); flex-shrink: 0;
}
.speaking-card h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 500; margin-bottom: 0.5rem; }
.speaking-card .speaking-venue { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.8rem; }
.speaking-card p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.6; }

/* ── Education ── */
.edu-pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.edu-item { margin-bottom: 2rem; }
.edu-item:last-child { margin-bottom: 0; }
.edu-degree { font-family: var(--sans); font-size: 1rem; font-weight: 500; margin-bottom: 0.3rem; }
.edu-school { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.2rem; }
.edu-year { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.pub-item {
  padding: 1.5rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; margin-bottom: 1rem; transition: border-color 0.3s;
}
.pub-item:last-child { margin-bottom: 0; }
.pub-item:hover { border-color: rgba(91, 168, 160, 0.3); }
.pub-title { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; margin-bottom: 0.3rem; }
.pub-type { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.subsection-title {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 400;
  margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-text h3 { font-family: var(--serif); font-size: 1.8rem; margin-bottom: 1rem; }
.contact-text p { color: var(--text-dim); margin-bottom: 2rem; }
.contact-links { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.contact-links a {
  display: flex; align-items: center; gap: 1rem; color: var(--text-dim);
  text-decoration: none; font-size: 0.92rem; transition: color 0.3s;
  padding: 1rem 1.5rem; border: 1px solid var(--border); border-radius: 3px; background: var(--surface);
}
.contact-links a:hover { color: var(--text); border-color: rgba(91, 168, 160, 0.3); }
.contact-links .link-label {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim);
  letter-spacing: 0.1em; text-transform: uppercase; width: 70px;
}

/* Volunteer badge */
.volunteer-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.2rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; font-size: 0.85rem; color: var(--text-dim); margin-top: 1.5rem;
}
.volunteer-badge span { color: var(--accent); font-size: 1.1rem; }

footer {
  padding: 3rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1280px; margin: 0 auto;
}
footer span { font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono); }

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

/* ── Page Header (listing & article pages) ── */
.page-header {
  padding-top: 10rem; padding-bottom: 3rem;
  max-width: 1280px; margin: 0 auto;
  padding-left: 3rem; padding-right: 3rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; margin-bottom: 1rem;
}
.page-header p { color: var(--text-dim); font-size: 1.05rem; max-width: 600px; }

/* ── Category filter tabs ── */
.category-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  padding: 0 3rem; max-width: 1280px; margin: 0 auto 3rem;
}
.category-tab {
  padding: 0.5rem 1.2rem; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--border); border-radius: 2px;
  color: var(--text-dim); transition: all 0.3s;
}
.category-tab:hover, .category-tab.active {
  border-color: var(--accent); color: var(--text); background: var(--accent-glow);
}

/* ── Article list ── */
.article-list {
  max-width: 1280px; margin: 0 auto;
  padding: 0 3rem 7rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.article-card {
  display: block; padding: 2.5rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 3px;
  text-decoration: none; color: inherit; transition: all 0.4s;
  position: relative; overflow: hidden;
}
.article-card:hover {
  border-color: rgba(91, 168, 160, 0.3); transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.article-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.article-card:hover::before { opacity: 1; }
.article-card-type {
  font-family: var(--mono); font-size: 0.68rem; color: var(--accent);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.8rem;
}
.article-card h2 {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  margin-bottom: 0.8rem; transition: color 0.3s;
}
.article-card:hover h2 { color: var(--accent); }
.article-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; margin-bottom: 1rem; }

.article-meta {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.05em;
}
.meta-sep { opacity: 0.4; }
.article-tags { display: flex; gap: 0.5rem; margin-left: 0.5rem; }
.tag {
  color: var(--accent); text-decoration: none;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em;
}
.tag:hover { text-decoration: underline; }

/* ── Single article page ── */
.article-header {
  padding-top: 10rem; padding-bottom: 3rem;
  max-width: 760px; margin: 0 auto;
  padding-left: 3rem; padding-right: 3rem;
}
.article-header h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400; line-height: 1.2; margin-bottom: 1.5rem;
}
.article-body { max-width: 760px; margin: 0 auto; padding: 0 3rem 7rem; }

/* Prose styling for Markdown */
.prose { color: var(--text-dim); font-size: 1.02rem; line-height: 1.85; }
.prose h2 {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 400;
  color: var(--text); margin: 3rem 0 1.2rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.prose h3 {
  font-family: var(--sans); font-size: 1.15rem; font-weight: 500;
  color: var(--text); margin: 2rem 0 0.8rem;
}
.prose p { margin-bottom: 1.5rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: transparent; }
.prose strong { color: var(--text); font-weight: 500; }
.prose blockquote {
  border-left: 2px solid var(--accent); padding-left: 1.5rem;
  margin: 2rem 0; color: var(--text); font-style: italic;
}
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface); padding: 0.15em 0.4em;
  border-radius: 3px; border: 1px solid var(--border);
}
.prose pre {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; padding: 1.5rem; margin: 2rem 0; overflow-x: auto;
}
.prose pre code { background: none; border: none; padding: 0; font-size: 0.85rem; }
.prose img { max-width: 100%; border-radius: 3px; border: 1px solid var(--border); margin: 2rem 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* Article navigation */
.article-nav {
  max-width: 760px; margin: 0 auto; padding: 0 3rem 4rem;
  display: flex; justify-content: space-between; gap: 2rem;
  border-top: 1px solid var(--border); padding-top: 2rem;
}
.article-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.88rem; transition: color 0.3s; }
.article-nav a:hover { color: var(--accent); }
.article-nav .nav-label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 0.3rem;
}

/* ── Pagination ── */
.pagination {
  display: flex; justify-content: center; gap: 1rem;
  padding: 2rem 3rem 4rem; max-width: 1280px; margin: 0 auto;
}
.pagination a, .pagination span {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; padding: 0.6rem 1.2rem;
  border: 1px solid var(--border); border-radius: 2px; color: var(--text-dim); transition: all 0.3s;
}
.pagination a:hover { border-color: var(--accent); color: var(--text); }
.pagination .active { border-color: var(--accent); color: var(--text); background: var(--accent-glow); }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 1.5rem; gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .hero { padding: 0 1.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { height: 300px; }
  .arch-ring:nth-child(1) { width: 280px; height: 280px; }
  .arch-ring:nth-child(2) { width: 210px; height: 210px; }
  .arch-ring:nth-child(3) { width: 130px; height: 130px; }
  section { padding: 4rem 1.5rem; }
  .about-grid, .edu-pub-grid, .contact-grid { grid-template-columns: 1fr; }
  .expertise-list { grid-template-columns: 1fr; }
  .speaking-card { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; }
  .page-header, .article-header { padding-left: 1.5rem; padding-right: 1.5rem; }
  .article-list { padding-left: 1.5rem; padding-right: 1.5rem; }
  .article-body { padding-left: 1.5rem; padding-right: 1.5rem; }
  .article-nav { padding-left: 1.5rem; padding-right: 1.5rem; }
  .category-tabs { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; }
  .stats-grid { grid-template-columns: 1fr; }
}
