:root {
  --bg: #fbfcff;
  --surface: #ffffff;
  --soft-blue: #f3f7ff;
  --soft-violet: #f8f5ff;
  --soft-cyan: #f2fbfc;
  --text: #101828;
  --muted: #667085;
  --line: #dfe5ee;
  --accent: #315efb;
  --accent-2: #7a5af8;
  --accent-3: #0ea5b7;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.container {
  width: min(calc(100% - 40px), var(--max));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

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

.name {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  gap: 28px;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.desktop-nav a:hover {
  color: var(--text);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav a {
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* Hero now uses the exact same .container as every other section */
.hero {
  padding: 74px 0 46px;
  background:
    radial-gradient(circle at 82% 16%, rgba(122, 90, 248, 0.11), transparent 22rem),
    radial-gradient(circle at 14% 0%, rgba(49, 94, 251, 0.08), transparent 23rem),
    linear-gradient(180deg, #fbfcff 0%, #f8faff 100%);
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: 900px;
  text-align: left;
}

.hero-meta {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(3.4rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  background: linear-gradient(90deg, #111827 0%, #2447d8 58%, #6d4be8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

.lead,
.research-callout p {
  color: var(--muted);
}

.lead {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.profiles-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-blue) 100%);
}

.work-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-violet) 100%);
}

.research-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--soft-cyan) 100%);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.simple-grid {
  display: grid;
  gap: 14px;
}

.simple-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.simple-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.item {
  padding: 20px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(223,229,238,0.98);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16,24,40,0.035);
}

.item-top,
.item-title {
  display: flex;
  align-items: center;
}

.item-top {
  justify-content: space-between;
  gap: 16px;
}

.item-title {
  gap: 12px;
}

.icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2f4f7;
  font-size: 1.05rem;
}

.github-icon {
  background: #f1f2f4;
}

.leetcode-icon {
  background: #fff7e8;
}

.linkedin-icon {
  background: #eaf4ff;
  color: #0a66c2;
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
}

.calendar-icon {
  background: #eef4ff;
}

.research-icon {
  background: #eafafb;
}

.pill {
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f2f5;
  color: #667085;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.research-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
}

.research-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.research-callout p {
  margin: 8px 0 0;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer {
  padding: 28px 0;
  background: #f9fafb;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.research-page {
  padding: 78px 0;
  min-height: 70vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(14, 165, 183, 0.12), transparent 22rem),
    #fbfcff;
}

.empty-state {
  margin-top: 28px;
  padding: 24px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .simple-grid.three,
  .simple-grid.two {
    grid-template-columns: 1fr;
  }

  .research-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 60px 0 38px;
  }

  .section {
    padding: 54px 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* Vector brand/app icons — no emoji rendering */
.icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}

.github-icon {
  color: #181717;
  background: #f1f2f4;
}

.leetcode-icon {
  color: #f89f1b;
  background: #fff6e6;
}

.linkedin-icon {
  color: #0a66c2;
  background: #eaf4ff;
}

.resume-icon {
  color: #e34f4f;
  background: #fff0f0;
}

.calendar-icon {
  color: #4285f4;
  background: #eef4ff;
}

.plan-icon {
  color: #7a5af8;
  background: #f2efff;
}

.code-icon {
  color: #16a085;
  background: #eafaf6;
}

.research-icon {
  color: #0ea5b7;
  background: #eafafb;
}


/* Research accordion */
.research-list {
  display: grid;
  gap: 12px;
}

.research-entry {
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.research-entry summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
}

.research-entry summary::-webkit-details-marker {
  display: none;
}

.research-entry-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.research-entry-title strong {
  font-size: 1.02rem;
}

.research-separator {
  color: #98a2b3;
  font-weight: 700;
}

.research-speaker {
  color: var(--muted);
  font-size: 0.95rem;
}

.research-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f2f4f7;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
}

.research-entry[open] .research-toggle {
  transform: rotate(45deg);
}

.research-content {
  padding: 2px 22px 24px;
  border-top: 1px solid var(--line);
}

.qa-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.qa-block:last-of-type {
  border-bottom: 0;
}

.question {
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.55;
}

.answer {
  margin: 0;
  color: var(--muted);
}

.resources {
  padding-top: 22px;
}

.resources h3 {
  margin-bottom: 10px;
}

.resources ul {
  margin: 0;
  padding-left: 22px;
}

.resources li + li {
  margin-top: 6px;
}

.resources a {
  color: var(--accent);
  word-break: break-all;
}

.resources a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  .research-entry summary {
    align-items: flex-start;
  }

  .research-entry-title {
    flex-wrap: wrap;
    row-gap: 2px;
  }
}


/* Lecture-specific research icons */
.research-entry summary {
  justify-content: flex-start;
}

.research-entry-title {
  flex: 1 1 auto;
}

.research-toggle {
  margin-left: auto;
}

.lecture-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.lecture-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}

.icon-programming {
  color: #315efb;
  background: #edf3ff;
}

.icon-theory {
  color: #7a5af8;
  background: #f2efff;
}

.icon-hci {
  color: #0a66c2;
  background: #eaf4ff;
}

.icon-robotics {
  color: #0e9f8c;
  background: #eafaf6;
}

.icon-tba {
  color: #667085;
  background: #f2f4f7;
}

/* Keep the placeholder rows the same overall size, but vertically center their text */
.research-content.placeholder-content {
  padding: 13px 22px;
  display: flex;
  align-items: center;
}

.research-content.placeholder-content .answer {
  width: 100%;
}

@media (max-width: 640px) {
  .lecture-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .lecture-icon svg {
    width: 19px;
    height: 19px;
  }
}


/* Final research icon alignment fixes */
.research-entry summary {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.lecture-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  line-height: 0;
}

.lecture-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  overflow: visible;
}

.lecture-icon svg path,
.lecture-icon svg circle {
  vector-effect: non-scaling-stroke;
}

.research-entry-title {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.research-toggle {
  margin-left: auto;
  align-self: center;
}

.icon-programming {
  color: #315efb;
  background: #edf3ff;
}

.icon-theory {
  color: #7a5af8;
  background: #f2efff;
}

.icon-hci {
  color: #0a66c2;
  background: #eaf4ff;
}

.icon-robotics {
  color: #0e9f8c;
  background: #eafaf6;
}

.icon-tba {
  color: #667085;
  background: #f2f4f7;
}

@media (max-width: 640px) {
  .research-entry summary {
    min-height: 76px;
    gap: 12px;
  }

  .lecture-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .lecture-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Real LeetCode brand mark */
.leetcode-icon {
  background: #fff6e6;
  color: #f89f1b;
}

.leetcode-icon img {
  width: 21px;
  height: 21px;
  display: block;
  object-fit: contain;
}

/* Final polish for the four corrected icons */
.code-icon svg {
  width: 22px;
  height: 22px;
}

.icon-programming svg {
  width: 22px;
  height: 22px;
}

.icon-theory svg {
  width: 22px;
  height: 22px;
}

.icon-hci svg {
  width: 24px;
  height: 24px;
}

/* Requested final sizing/alignment adjustments */
.icon-theory svg {
  width: 28px;
  height: 28px;
}

.code-icon svg,
.icon-programming svg {
  width: 23px;
  height: 23px;
}

.code-icon svg path,
.icon-programming svg path {
  fill: none;
}

/* Balance the whitespace above and below the hero content */
.hero {
  padding-top: 46px;
  padding-bottom: 46px;
}

@media (max-width: 760px) {
  .hero {
    padding-top: 38px;
    padding-bottom: 38px;
  }
}

/* Keep the hero subtitle on one line on wide desktop screens */
@media (min-width: 1100px) {
  .hero-content {
    max-width: 100%;
  }

  .lead {
    max-width: none;
    white-space: nowrap;
  }
}

/* Time Management research entry */
.icon-time {
  color: #d97706;
  background: #fff7e8;
}
.icon-time svg {
  width: 24px;
  height: 24px;
}
.lecture-points {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}
.lecture-point {
  padding-left: 18px;
  border-left: 2px solid #e4e7ec;
}
.point-title {
  margin: 0 0 6px;
  color: var(--text);
  font-weight: 700;
}

/* Refined formatting for Randy Pausch's five lecture points */
.lecture-points {
  gap: 18px;
  margin-top: 18px;
}

.lecture-point {
  position: relative;
  padding-left: 22px;
  border-left: 0;
}

.lecture-point::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.point-title {
  margin: 0 0 5px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.lecture-point .answer {
  margin: 0;
}

/* Randy Pausch five-points visual refinement */
.lecture-point::before {
  background: #d97706;
}

.point-title {
  color: #475467;
  font-weight: 600;
}

/* Match the bottom whitespace of the Time Management notes area to the top whitespace */
.time-management-content {
  padding-bottom: 2px;
}

/* Match Randy Pausch bullet color to its point-title text */
.lecture-point::before {
  background: #475467;
}

/* Active profile links */
.profile-link {
  display: block;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.profile-link:hover {
  transform: translateY(-2px);
  border-color: #cfd8e8;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06);
}

.profile-arrow {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}
