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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #0a0a0a;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Sidebar ───────────────────────────────────────── */

aside {
  width: 260px;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  gap: 32px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.sidebar-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #0a0a0a;
  text-transform: uppercase;
}

.sidebar-year {
  font-size: 10px;
  color: #bbb;
  letter-spacing: 0.3px;
}

/* ─── Sidebar Nav ───────────────────────────────────── */

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0 18px 14px;
  border-top: 1px solid #e8e8e8;
  position: relative;
  transition: opacity 0.15s;
}

.nav-item:last-child {
  border-bottom: 1px solid #e8e8e8;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #0a0a0a;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item:hover {
  opacity: 0.65;
}

.nav-item.active {
  opacity: 1;
}

.nav-item-top {
  display: flex;
  justify-content: space-between;
}

.nav-num {
  font-size: 10px;
  color: #bbb;
  letter-spacing: 0.4px;
}

.nav-title {
  font-size: 15px;
  font-weight: 500;
  color: #0a0a0a;
  line-height: 1.3;
}

.nav-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-sub {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #bbb;
}

.nav-arrow {
  font-size: 12px;
  color: #ccc;
  transition: color 0.15s, transform 0.15s;
}

.nav-item.active .nav-arrow,
.nav-item:hover .nav-arrow {
  color: #0a0a0a;
  transform: translateX(3px);
}

/* ─── Main ──────────────────────────────────────────── */

main {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* ─── Sections ──────────────────────────────────────── */

section {
  padding: 64px 72px;
  border-bottom: 1px solid #e8e8e8;
  min-height: 100vh;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 40px;
}

/* ─── Introduction / Hero ───────────────────────────── */

#introduction {
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-grid {
  display: flex;
  align-items: center;
  gap: 72px;
  width: 100%;
}

.intro-text {
  flex: 1;
  min-width: 0;
}

.intro-bio {
  margin-top: 28px;
  font-size: 15px;
  line-height: 1.82;
  color: #333;
  max-width: 480px;
  padding-left: 16px;
}

.intro-bio-text {
  padding-left: 0;
}

.intro-bio li {
  margin-bottom: 4px;
}

.hero-name {
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 1.08;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.hero-title {
  font-size: 15px;
  color: #555;
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.hero-role {
  font-size: 13px;
  color: #999;
  min-height: 20px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

.cursor {
  display: inline-block;
  font-weight: 300;
  color: #ccc;
  margin-left: 1px;
  animation: blink 1.1s step-end infinite;
}

.hero-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero-links a {
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.hero-links a:hover {
  color: #0a0a0a;
  border-color: #0a0a0a;
}

.intro-photo {
  flex-shrink: 0;
}

.intro-photo img {
  width: 320px;
  height: 350px;
  border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
  object-fit: cover;
  object-position: center 10%;
  transition: border-radius 0.6s ease;
}

.intro-photo img:hover {
  border-radius: 58% 42% 45% 55% / 52% 56% 44% 48%;
}

.personal-placeholder p {
  font-size: 14px;
  color: #bbb;
}

/* ─── Entries ───────────────────────────────────────── */

.entry {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f4f4f4;
}

.entry:last-of-type {
  border-bottom: none;
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 3px;
}

.entry-role {
  font-size: 14px;
  font-weight: 500;
}

.entry-date {
  font-size: 12px;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-org {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin-bottom: 9px;
}

.entry ul {
  padding-left: 14px;
  margin-top: 9px;
}

.entry ul li {
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
  line-height: 1.58;
}

/* ─── Tech Stack ────────────────────────────────────── */

.tech-categories {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cat-label {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 12px;
}

.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  cursor: default;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease,
              border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.tech-item:hover {
  border-color: #bbb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.tech-item img {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.tech-item span {
  font-size: 12.5px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
}

.tech-dot {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  flex-shrink: 0;
}

.si-item img {
  opacity: 0.8;
}

/* ─── Coursework pills ──────────────────────────────── */

.course-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid #f0f0f0;
}

.course-grid-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 4px;
  display: block;
}

.course-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.course-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: default;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.course-item:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.course-item span:last-child {
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.illinois-i {
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  flex-shrink: 0;
}

.course-item.cs  { border-color: rgba(26,100,200,0.28); background: rgba(26,100,200,0.03); }
.course-item.cs .illinois-i { color: #1a64c8; }
.course-item.cs:hover { border-color: rgba(26,100,200,0.55); }

.course-item.math { border-color: rgba(220,100,30,0.28); background: rgba(220,100,30,0.03); }
.course-item.math .illinois-i { color: #dc641e; }
.course-item.math:hover { border-color: rgba(220,100,30,0.55); }

.course-item.stat { border-color: rgba(184,144,10,0.3); background: rgba(200,158,10,0.03); }
.course-item.stat .illinois-i { color: #b8900a; }
.course-item.stat:hover { border-color: rgba(184,144,10,0.55); }

/* ─── Personal ──────────────────────────────────────── */

.personal-bio {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  max-width: 640px;
  margin-bottom: 36px;
}

.map-wrapper {
  width: 100%;
  max-width: 860px;
}

.map-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #ccc;
  margin-bottom: 14px;
}

#world-map {
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid #e8e8e8;
  position: relative;
}

#world-map .leaflet-container {
  background: #f0f0f0;
}

#world-map path {
  cursor: default;
}

#us-map {
  width: 100%;
  height: 360px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
  border: 1px solid #e8e8e8;
  position: relative;
}

#us-map .leaflet-container {
  background: #f0f0f0;
}

#us-map path {
  cursor: default;
}

/* ─── Footer ────────────────────────────────────────── */

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid #ebebeb;
  font-size: 12px;
  color: #ccc;
}

/* ─── Scroll animations ─────────────────────────────── */

.animate {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Keyframes ─────────────────────────────────────── */

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

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

/* ─── Mobile ────────────────────────────────────────── */

@media (max-width: 768px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  body {
    flex-direction: column;
  }

  aside {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
    padding: 20px 24px;
    gap: 0;
  }

  .sidebar-nav {
    display: none;
  }

  main {
    height: auto;
    overflow-y: visible;
  }

  section {
    padding: 48px 24px;
    min-height: auto;
  }

  .intro-grid {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 24px;
  }

  .intro-photo img {
    width: 180px;
    height: 200px;
  }

  .hero-name {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .entry-meta {
    flex-direction: column;
    gap: 2px;
  }
}
