:root {
  --paper: #faf9f7;
  --panel: #f1eee9;
  --ink: #12110f;
  --muted: #6c6862;
  --line: #ddd8d2;
  --accent: #d10069;
  --accent-dark: #a80055;
  --accent-wash: #f8e5ef;
}

#math-background{position:fixed;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
body{isolation:isolate}
.route-card,.project-card{background:rgba(250,249,247,.7)}
@media(max-width:600px){.site-nav{gap:12px;flex-wrap:wrap;padding-block:12px}.nav-links{gap:18px;flex-wrap:wrap}}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next Rounded", "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.home-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(55px, 9vw, 130px);
  padding: clamp(72px, 8vw, 110px) 0 64px;
}

.home-title,
.page-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.055em;
}

.home-title {
  max-width: 850px;
  font-size: clamp(68px, 10.5vw, 138px);
  line-height: 0.85;
}

.home-copy {
  max-width: 620px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.48;
  letter-spacing: -0.025em;
}

.route-section {
  padding: 0 0 80px;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.route-card {
  min-height: 170px;
  padding: 28px;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease;
}

.route-card:hover {
  border-color: var(--ink);
  background: var(--panel);
}

.route-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.route-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: clamp(64px, 7vw, 90px) 0 56px;
  border-bottom: 1px solid var(--line);
}

.page-title {
  max-width: 900px;
  font-size: clamp(58px, 9vw, 112px);
  line-height: 0.9;
}

.page-intro {
  max-width: 720px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.52;
  letter-spacing: -0.02em;
}

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

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(60px, 10vw, 140px);
}

.section-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.bio-copy p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-list span:first-child {
  color: var(--muted);
}

.detail-list a {
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

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

.fitness-header {
  margin-bottom: 42px;
}

.pr-group + .pr-group {
  margin-top: 58px;
}

.running-record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.running-record strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.pr-group h3 {
  margin: 0 0 16px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--ink);
}

.pr-table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  text-align: left;
}

.pr-table th,
.pr-table td {
  padding: 17px 14px;
  border-bottom: 1px solid var(--line);
}

.pr-table th {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pr-table th:first-child,
.pr-table td:first-child {
  padding-left: 0;
}

.pr-table td {
  font-size: 14px;
}

.pr-table td:first-child {
  width: 38%;
  font-weight: 700;
}

.pr-value {
  font-variant-numeric: tabular-nums;
}

.na {
  color: #aaa59f;
}

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

.project-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 38px);
  border: 1px solid var(--line);
  text-decoration: none;
}

a.project-card {
  transition: border-color 180ms ease, background 180ms ease;
}

a.project-card:hover {
  border-color: var(--ink);
  background: var(--panel);
}

.project-card h2 {
  max-width: 480px;
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.project-card p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button:hover {
  background: var(--ink);
  color: #fff;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: clamp(50px, 8vw, 110px);
  margin-top: 48px;
}

.resume-list {
  border-top: 1px solid var(--ink);
}

.resume-entry {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}

.resume-entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.resume-entry h3,
.resume-aside-section h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.resume-entry-head span,
.education-entry span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.resume-entry p,
.education-entry p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.resume-sidebar {
  display: grid;
  align-content: start;
  gap: 48px;
}

.resume-aside-section {
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.resume-skills {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.education-entry {
  display: grid;
  gap: 3px;
  margin-top: 22px;
}

.education-entry strong {
  font-size: 14px;
}

.site-footer {
  padding: 30px 0;
}

.footer-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  color: var(--muted);
  font-size: 12px;
}

.footer-inner a {
  text-decoration: none;
}

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

@media (max-width: 860px) {
  .home-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 58px 0 42px;
  }

  .route-grid,
  .projects-grid,
  .split,
  .fitness-header,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .route-card {
    min-height: 150px;
  }

  .content-section {
    padding: 60px 0;
  }

  .projects-grid {
    gap: 14px;
  }

  .project-card {
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 30px, 1180px);
  }

  .site-nav {
    min-height: 76px;
    gap: 16px;
  }

  .brand span {
    display: none;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .home-title {
    font-size: clamp(62px, 21vw, 92px);
  }

  .page-title {
    font-size: clamp(54px, 18vw, 78px);
  }

  .page-hero {
    padding: 58px 0 48px;
  }

  .detail-list li,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-list li {
    gap: 4px;
  }

  .resume-entry-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .resume-entry-head span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
