:root {
  --bg: #0d1017;
  --ink: #f2f4f8;
  --muted: #9aa3b4;
  --soft: #151a24;
  --card: rgba(255, 255, 255, 0.045);
  --card2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #8cabff;
  --accent2: #d7e2ff;
}

:root.light {
  --bg: #f7f8fb;
  --ink: #11141b;
  --muted: #667085;
  --soft: #eef2fa;
  --card: rgba(255, 255, 255, 0.75);
  --card2: rgba(235, 240, 255, 0.95);
  --line: rgba(17, 24, 39, 0.12);
  --accent: #315cff;
  --accent2: #11141b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  transition: background 0.28s ease, color 0.28s ease;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 8% 18%, rgba(140, 171, 255, 0.12), transparent 28%),
    radial-gradient(circle at 95% 15%, rgba(121, 82, 255, 0.11), transparent 30%),
    linear-gradient(180deg, transparent 58%, rgba(140, 171, 255, 0.07));
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.75;
}

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

button {
  font: inherit;
}

strong {
  color: var(--accent2);
  font-weight: 800;
}

.page {
  width: min(980px, 90vw);
  margin: 0 auto;
  padding: 26px 0 40px;
}

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

.mark {
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.07em;
  border-bottom: 1px solid transparent;
}

.mark:hover {
  border-color: var(--accent);
}

.theme {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0;
}

.theme:hover {
  color: var(--accent);
}

.hero {
  padding: 36px 0 46px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.65rem, 7vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
  margin: 0 0 22px;
}

.intro {
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.82;
  color: var(--muted);
  max-width: 910px;
  margin: 0;
}

.section,
.stack-section {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  margin-top: 20px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head span {
  color: var(--accent);
  font-weight: 800;
}

.section-head small {
  color: var(--muted);
  font-size: 0.75rem;
}

.stack-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.stack-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding: 14px;
  animation: slide 26s linear infinite;
}

.stack-window:hover .stack-track {
  animation-play-state: paused;
}

.stack-track span {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--muted);
}

@keyframes slide {
  to {
    transform: translateX(-50%);
  }
}

.accordion {
  display: grid;
  gap: 9px;
}

.row {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.row:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 171, 255, 0.45);
  background: var(--card2);
}

.row-top {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  gap: 18px;
  cursor: pointer;
  padding: 15px 16px;
}

.row-top b {
  display: block;
  font-size: 0.98rem;
}

.row-top em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.row-top i {
  font-style: normal;
  color: var(--accent);
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.row.open .row-top i {
  transform: rotate(45deg);
}

.row-body {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.28s ease, padding 0.28s ease;
}

.row.open .row-body {
  max-height: 360px;
  padding: 0 16px 15px;
}

.row-body p {
  margin: 7px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.project-card {
  min-height: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 171, 255, 0.45);
  background: var(--card2);
}

.project-card h2 {
  font-size: 1.25rem;
  letter-spacing: -0.055em;
  margin: 0 0 12px;
}

.project-card p {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
  margin: 0 0 10px;
}

.project-note {
  color: var(--accent) !important;
  font-weight: 800;
  margin-top: 14px !important;
}

.project-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  font-weight: 800;
  font-size: 0.84rem;
  border-bottom: 1px solid transparent;
}

.project-link:hover {
  border-color: var(--accent);
}

.honors-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.honors-grid button {
  min-height: 96px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 13px;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.honors-grid button:hover,
.honors-grid button.active {
  background: var(--card2);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.honors-grid button em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  margin-top: 6px;
}

.honor-detail {
  min-height: 34px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.55;
}

.honor-detail:empty {
  display: none;
}

.honor-detail a {
  color: var(--accent);
  font-weight: 800;
  border-bottom: 1px solid transparent;
}

.honor-detail a:hover {
  border-color: var(--accent);
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer div {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--accent);
  font-weight: 800;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  border-color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 780px) {
  .page {
    width: min(92vw, 980px);
    padding-top: 18px;
  }

  .nav {
    margin-bottom: 42px;
  }

  .hero {
    padding-top: 18px;
  }

  .footer {
    display: block;
  }

  .footer div {
    margin-top: 12px;
  }

  .stack-track {
    animation-duration: 18s;
  }
}

@media (max-width: 520px) {
  .honors-grid {
    grid-template-columns: 1fr;
  }

  .honors-grid button {
    min-height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  #stars {
    display: none;
  }
}
