:root {
  --bg: #0b1120;
  --bg-muted: #111827;
  --surface: #1e293b;
  --surface-hover: #243044;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --border: rgba(148, 163, 184, 0.16);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --max-width: 1680px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

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

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

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 17, 32, 0.82);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.nav-logo {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  position: relative;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.page-view {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page-view-active {
  display: block;
}

.hero.page-view-active {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero.page-view-active > .container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.08), transparent 25%),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero-side {
  display: grid;
  gap: 1.25rem;
  max-width: 360px;
  width: 100%;
  justify-self: end;
}

.hero-side .profile-photo-wrap {
  width: 100%;
  max-width: 320px;
  justify-self: center;
}

.hero-photo,
.profile-photo {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 8%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.about-sidebar .profile-photo-wrap {
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.25rem;
}

.about-sidebar .about-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.about-main {
  min-width: 0;
}

.about-main h2 {
  margin: 0 0 1rem;
}

.about-main p {
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 1.25rem;
}

.about-main p:last-of-type {
  margin-bottom: 0;
}

.about-list {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text);
  line-height: 1.65;
}

.profile-photo-wrap,
.hero-photo-wrap {
  padding: 0.35rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.45), rgba(14, 165, 233, 0.12));
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #082f49;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.4);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.hero-card {
  background: rgba(30, 41, 59, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.stat {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-card-note {
  margin: 1.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section {
  padding: 5rem 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-contact {
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.08), transparent 55%),
    var(--bg-muted);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.lead,
.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 42rem;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
}

.skills-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.skill-card,
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skill-card h3,
.project-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.skill-card p,
.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-card {
  display: block;
  color: inherit;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: rgba(56, 189, 248, 0.35);
  color: inherit;
}

.project-link {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.timeline {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -1.84rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.12);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.timeline-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.timeline-date {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.timeline-org {
  margin: 0.35rem 0 1rem;
  color: var(--text-muted);
}

.timeline-content ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: var(--text);
  font-size: 0.92rem;
}

.subsection-title {
  margin: 3rem 0 1rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.publications-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.publication-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.publication-year {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.publication-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.45;
}

.publication-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

.book-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.book-date {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.book-card h4 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.45;
}

.book-meta {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.book-card > p:not(.book-meta) {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.book-card code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  color: var(--accent);
}

.featured-blog-card {
  grid-column: 1 / -1;
}

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

.volunteer-card {
  grid-column: 1 / -1;
}

.volunteer-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.volunteer-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
}

.event-card {
  max-width: none;
}

.event-card + .event-card {
  margin-top: 2rem;
}

.event-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.4;
}

.event-subheading {
  margin: 1.25rem 0 0.75rem;
  font-size: 1rem;
}

.event-list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.event-list li + li {
  margin-top: 0.65rem;
}

.event-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.event-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
}

.speaking-poster {
  grid-template-columns: 1fr;
  max-width: 420px;
}

.video-preview {
  width: 100%;
  max-width: 720px;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.video-preview-play {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.video-preview-play img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-preview-play::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease;
}

.video-preview-play:hover::before,
.video-preview-play:focus-visible::before {
  background: rgba(0, 0, 0, 0.38);
}

.video-preview-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
  transition: transform 0.2s ease;
}

.video-preview-play:hover .video-preview-icon,
.video-preview-play:focus-visible .video-preview-icon {
  transform: translate(-50%, -50%) scale(1.06);
}

.video-preview-bg {
  fill: #f03;
}

.video-preview-active iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

@media (min-width: 901px) {
  .featured-blog-card {
    max-width: none;
  }
}

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

.book-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.book-links a:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--surface-hover);
  color: inherit;
}

.article-date {
  display: inline-block;
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

.article-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  line-height: 1.45;
}

.article-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-notes {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
}

.form-field textarea {
  resize: vertical;
  min-height: 8rem;
}

.contact-honey {
  display: none;
}

.contact-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .split,
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .books-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .volunteer-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-side {
    max-width: none;
    justify-self: stretch;
  }

  .hero-side .profile-photo-wrap {
    max-width: 280px;
    margin-inline: auto;
  }

  .about-sidebar .profile-photo-wrap {
    max-width: 280px;
    margin-inline: auto;
  }

  .publication-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(11, 17, 32, 0.96);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    display: none;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3.5rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
