:root {
  --page: #f6f7fb;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #5e6877;
  --soft: #eef2f6;
  --line: #dce3ea;
  --teal: #0f766e;
  --coral: #c84d3f;
  --gold: #af761a;
  --violet: #6554c0;
  --shadow: 0 18px 50px rgba(29, 39, 51, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(101, 84, 192, 0.06) 1px, transparent 1px),
    var(--page);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.86), rgba(246, 247, 251, 0.54) 34%, rgba(246, 247, 251, 0.9)),
    radial-gradient(circle at 92% 12%, rgba(200, 77, 63, 0.13), transparent 23%),
    radial-gradient(circle at 7% 82%, rgba(15, 118, 110, 0.12), transparent 26%);
}

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

a:hover {
  color: var(--teal);
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 56px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0;
}

.profile-panel {
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 26px;
  border: 1px solid rgba(220, 227, 234, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.identity {
  display: grid;
  gap: 12px;
}

.avatar {
  width: 168px;
  height: 168px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(29, 39, 51, 0.18);
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.identity h1,
.intro-section h2,
.page-section h2,
.project-card h3,
.timeline-item h3,
.education-block h3,
.github-strip h3 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

.identity h1 {
  font-size: 1.75rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.98rem;
}

.section-nav {
  display: grid;
  gap: 2px;
  margin: 24px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-nav a {
  display: flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.section-nav a.is-active,
.section-nav a:hover {
  border-left-color: var(--teal);
  background: rgba(15, 118, 110, 0.08);
  color: var(--ink);
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.contact-links a,
.button-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.contact-links a:hover,
.button-link:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(15, 118, 110, 0.08);
}

.contact-links span {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
}

.quick-facts {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.quick-facts div {
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.quick-facts strong,
.quick-facts span {
  display: block;
}

.quick-facts span {
  color: var(--muted);
  font-size: 0.92rem;
}

.content {
  display: grid;
  gap: 54px;
  min-width: 0;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: center;
  padding-top: 12px;
}

.intro-section > div:first-child {
  display: grid;
  gap: 18px;
}

.intro-section h2 {
  max-width: 780px;
  font-size: 2.25rem;
}

.intro-section p:not(.eyebrow),
.page-section p,
.timeline-item li,
.news-list span,
.education-block p {
  color: var(--muted);
}

.system-visual {
  min-height: 390px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.82)),
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(101, 84, 192, 0.1));
  box-shadow: var(--shadow);
}

.visual-header {
  display: flex;
  gap: 7px;
  padding-bottom: 22px;
}

.visual-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.visual-header span:nth-child(2) {
  background: var(--gold);
}

.visual-header span:nth-child(3) {
  background: var(--teal);
}

.node-grid {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 16px 10px;
  align-items: center;
}

.node,
.connector {
  min-height: 56px;
  border-radius: var(--radius);
}

.node {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(220, 227, 234, 0.94);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

.node-accent {
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--teal);
}

.node-warm {
  border-color: rgba(200, 77, 63, 0.3);
  color: var(--coral);
}

.node-cool {
  border-color: rgba(101, 84, 192, 0.3);
  color: var(--violet);
}

.connector {
  position: relative;
  min-height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
}

.connector::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--coral);
  border-right: 2px solid var(--coral);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.system-visual p {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.page-section {
  scroll-margin-top: 28px;
}

.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.page-section h2 {
  font-size: 1.6rem;
}

.news-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.news-list time {
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 900;
}

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

.interest-grid article,
.project-card,
.education-block article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.interest-grid article {
  padding: 18px;
}

.interest-grid h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
}

.timeline::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 7px;
  width: 2px;
  background: linear-gradient(var(--teal), var(--coral), var(--gold));
  content: "";
}

.timeline-item {
  position: relative;
  padding-left: 36px;
}

.timeline-item::before {
  position: absolute;
  top: 4px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.28);
  content: "";
}

.timeline-item:nth-child(2)::before {
  background: var(--violet);
  box-shadow: 0 0 0 1px rgba(101, 84, 192, 0.28);
}

.timeline-item:nth-child(3)::before {
  background: var(--coral);
  box-shadow: 0 0 0 1px rgba(200, 77, 63, 0.28);
}

.timeline-item h3 {
  margin-top: 4px;
  font-size: 1.2rem;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink);
  font-weight: 900;
}

.item-meta time {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.stack {
  margin-top: 8px;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 900;
}

.timeline-item ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 19px;
}

.project-card {
  display: grid;
  gap: 12px;
  min-height: 238px;
  padding: 18px;
}

.project-topline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.project-topline h3 {
  font-size: 1.08rem;
}

.project-topline span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(175, 118, 26, 0.12);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
}

.github-strip {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.github-strip h3 {
  font-size: 1.04rem;
}

.repo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.repo-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.repo-card strong {
  color: var(--ink);
}

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

.education-block article {
  padding: 20px;
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.skills-cloud span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    width: min(760px, calc(100% - 32px));
    padding: 28px 0;
  }

  .profile-panel {
    position: static;
  }

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

  .intro-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  body {
    background-size: 40px 40px;
  }

  .site-shell {
    width: min(100% - 24px, 760px);
    padding: 18px 0;
  }

  .profile-panel,
  .system-visual,
  .interest-grid article,
  .project-card,
  .education-block article,
  .github-strip {
    padding: 16px;
  }

  .avatar {
    width: 132px;
    height: 132px;
  }

  .identity h1 {
    font-size: 1.48rem;
  }

  .intro-section h2 {
    font-size: 1.75rem;
  }

  .section-nav,
  .interest-grid,
  .project-grid,
  .repo-list {
    grid-template-columns: 1fr;
  }

  .news-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .project-topline,
  .github-strip {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .connector {
    width: 3px;
    min-height: 24px;
    justify-self: center;
    background: linear-gradient(180deg, var(--teal), var(--coral));
  }

  .connector::after {
    top: auto;
    right: 50%;
    bottom: -3px;
    transform: translateX(50%) rotate(135deg);
  }
}
