:root {
  --bg: #07111f;
  --bg-soft: #0d1a2e;
  --panel: rgba(12, 23, 40, 0.88);
  --panel-strong: rgba(8, 16, 29, 0.96);
  --card: rgba(14, 28, 49, 0.88);
  --card-alt: rgba(11, 34, 45, 0.84);
  --ink: #eff8ff;
  --muted: #9eb0c9;
  --line: rgba(148, 173, 204, 0.18);
  --accent: #67f7d4;
  --accent-strong: #13c6c4;
  --accent-soft: rgba(103, 247, 212, 0.12);
  --accent-alt: #8de45f;
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(19, 198, 196, 0.16), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(141, 228, 95, 0.14), transparent 18%),
    radial-gradient(circle at 55% 78%, rgba(27, 82, 175, 0.18), transparent 30%),
    linear-gradient(180deg, #091426 0%, #07111f 42%, #081524 100%);
  font-family: "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.74);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.16rem;
}

.brand-mark,
h1,
h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

.brand-mark {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.brand-note,
.eyebrow,
.meta,
.tag,
.mini-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.8rem 1.15rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  text-decoration: none;
}

.markdown-page {
  padding: 2.25rem 0 3rem;
}

.detail-page {
  max-width: 980px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.25rem;
  padding: 1rem 0 1.6rem;
}

.panel,
.card,
.role,
.project,
.publication,
.social-band,
.hero-summary,
.skill-cluster {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel::before,
.card::before,
.role::before,
.project::before,
.publication::before,
.social-band::before,
.hero-summary::before,
.skill-cluster::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 24%);
}

.panel,
.card,
.role,
.project,
.publication,
.social-band,
.hero-summary,
.skill-cluster {
  position: relative;
}

.hero-copy,
.profile-panel,
.card,
.role,
.project,
.publication,
.social-band,
.hero-summary,
.skill-cluster {
  padding: 1.55rem;
}

.hero-copy {
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(19, 198, 196, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(12, 23, 40, 0.98), rgba(7, 17, 31, 0.96));
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -5%;
  top: -10%;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(103, 247, 212, 0.18), transparent 68%);
}

.eyebrow,
.meta,
.mini-label {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  color: #ffffff;
}

h1 {
  margin-top: 0.9rem;
  max-width: 12ch;
  font-size: clamp(2.9rem, 5.4vw, 5.5rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 1.03;
}

h3 {
  font-size: 1.14rem;
}

p,
li {
  color: var(--muted);
  line-height: 1.74;
}

.lede {
  max-width: 64ch;
  margin-top: 1.1rem;
  font-size: 1.05rem;
}

.actions,
.links,
.tags,
.social-list,
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.actions {
  margin-top: 1.4rem;
}

.button,
.button-ghost,
.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-weight: 800;
}

.button {
  color: #04111a;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

.button-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.hero-right {
  display: grid;
  gap: 1rem;
}

.profile-panel {
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(10, 18, 32, 0.98), rgba(8, 18, 33, 0.92)),
    linear-gradient(135deg, rgba(103, 247, 212, 0.08), transparent 40%);
}

.initials {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  border-radius: 22px;
  color: #04111a;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 20px 40px rgba(19, 198, 196, 0.18);
}

.metric-grid,
.card-grid,
.timeline,
.publication-grid,
.project-grid,
.split-grid,
.skill-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.metric {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.metric strong {
  display: block;
  color: #ffffff;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.5rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

section {
  padding: 1.15rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head p {
  max-width: 38rem;
}

.section-head h2 {
  max-width: 14ch;
}

.card-grid,
.project-grid,
.publication-grid,
.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.split-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.74rem;
  font-weight: 800;
}

.links {
  margin-top: 1rem;
}

.links a {
  font-weight: 800;
}

.role,
.project,
.publication,
.card {
  background: linear-gradient(180deg, rgba(16, 28, 49, 0.9), rgba(10, 18, 32, 0.9));
}

.project h3,
.role h3,
.publication h3,
.card h3 {
  margin-bottom: 0.45rem;
}

.social-band {
  margin-top: 0.2rem;
  background:
    linear-gradient(180deg, rgba(11, 23, 41, 0.98), rgba(7, 17, 31, 0.92)),
    linear-gradient(135deg, rgba(141, 228, 95, 0.08), transparent 36%);
}

.social-band h3,
.skill-cluster h3,
.hero-summary h3 {
  color: #ffffff;
}

.social-list {
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.social-list li {
  list-style: none;
}

.social-pill {
  min-width: 52px;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.social-pill .symbol {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: rgba(103, 247, 212, 0.14);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
}

.skill-cluster,
.hero-summary {
  background: linear-gradient(180deg, rgba(12, 32, 39, 0.96), rgba(8, 18, 32, 0.94));
}

.skill-grid {
  margin-top: 1rem;
}

.skill-tile {
  min-height: 122px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.skill-tile strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.skill-tile span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #dcefff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
}

.back {
  display: inline-flex;
  margin-bottom: 1rem;
  font-weight: 800;
}

.pdf-frame {
  width: 100%;
  min-height: 620px;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.loading {
  padding: 1rem 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero,
  .card-grid,
  .project-grid,
  .timeline,
  .publication-grid,
  .split-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .topbar-inner,
  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  h1,
  .section-head h2 {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 1180px);
  }

  .hero-copy,
  .profile-panel,
  .card,
  .role,
  .project,
  .publication,
  .social-band,
  .hero-summary,
  .skill-cluster {
    padding: 1.15rem;
    border-radius: 18px;
  }

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

  .button,
  .button-ghost,
  .social-pill {
    width: 100%;
    justify-content: flex-start;
  }
}
