:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c1d20;
  --muted: #626972;
  --line: #d9d4cc;
  --accent: #0f766e;
  --accent-strong: #114d46;
  --rust: #b45309;
  --blue: #315f8f;
  --shadow: 0 20px 60px rgba(26, 29, 33, 0.1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(28, 29, 32, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(28, 29, 32, 0.03) 1px, transparent 1px),
    var(--bg);
  background-size: 56px 56px;
  color: var(--ink);
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(247, 244, 239, 0.84);
  border-bottom: 1px solid rgba(217, 212, 204, 0.78);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(20px, 5vw, 72px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 0.98rem;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.mascot-mark {
  background: #fff8d8;
  border: 1px solid #f0d260;
}

.mascot-mark img {
  height: 30px;
  width: 30px;
}

.nav {
  align-items: center;
  display: flex;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a {
  color: var(--muted);
}

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

.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 84px clamp(20px, 5vw, 72px);
}

.hero {
  align-items: center;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.82fr);
  min-height: calc(100vh - 72px);
  padding-top: 58px;
}

.profile-hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.68fr);
}

.eyebrow,
.section-label {
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 24px;
  max-width: 920px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.02;
  margin-bottom: 0;
}

h3 {
  font-size: 1.2rem;
  letter-spacing: 0;
  line-height: 1.25;
  margin-bottom: 10px;
}

.intro {
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.7;
  max-width: 720px;
}

.secondary-intro {
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  margin-top: -8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

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

.button.primary:hover {
  background: var(--accent-strong);
  color: white;
}

.icon-button {
  gap: 9px;
}

.icon-button img {
  border-radius: 5px;
  height: 22px;
  width: 22px;
}

.research-visual {
  aspect-ratio: 1 / 0.88;
  background:
    radial-gradient(circle at 20% 20%, rgba(15, 118, 110, 0.16), transparent 30%),
    radial-gradient(circle at 86% 82%, rgba(180, 83, 9, 0.15), transparent 34%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 330px;
  overflow: hidden;
  position: relative;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.profile-card > img {
  aspect-ratio: 4 / 4.2;
  display: block;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.profile-card div {
  padding: 24px;
}

.profile-card h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.profile-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.lines {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.lines path {
  fill: none;
  stroke: rgba(28, 29, 32, 0.22);
  stroke-width: 2;
}

.node {
  align-items: center;
  background: var(--surface);
  border: 1px solid rgba(28, 29, 32, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(28, 29, 32, 0.1);
  display: flex;
  font-size: 0.88rem;
  font-weight: 800;
  justify-content: center;
  min-height: 54px;
  padding: 12px;
  position: absolute;
  text-align: center;
  width: 142px;
  z-index: 2;
}

.node-main {
  background: var(--ink);
  color: white;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 168px;
}

.node-a {
  left: 8%;
  top: 12%;
}

.node-b {
  right: 8%;
  top: 12%;
}

.node-c {
  bottom: 14%;
  left: 7%;
}

.node-d {
  bottom: 14%;
  right: 7%;
}

.split {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 52px;
  grid-template-columns: 0.8fr 1.2fr;
}

.section-body {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.compact-section {
  padding-bottom: 36px;
  padding-top: 36px;
}

.keyword-strip {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px 0;
}

.keyword-strip img {
  background: #fff8d8;
  border: 1px solid #f0d260;
  border-radius: 8px;
  height: 42px;
  padding: 5px;
  width: 42px;
}

.keyword-strip span {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 10px 12px;
}

.focus-grid {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, 1fr);
}

.focus-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  min-height: 270px;
  padding: 28px;
}

.focus-item span {
  color: var(--rust);
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 42px;
}

.focus-item p,
.project-item p,
.publication-panel p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-item {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 28px 0;
}

.project-item a {
  color: var(--accent-strong);
  font-weight: 800;
}

.publication-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 42px);
}

.research-feature {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  margin-bottom: 28px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
}

.research-feature p {
  color: var(--muted);
  line-height: 1.75;
}

.research-feature img {
  display: block;
  max-width: 100%;
}

.detailed-grid {
  margin-bottom: 28px;
}

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

.image-grid figure {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.image-grid img {
  aspect-ratio: 16 / 9;
  background: white;
  display: block;
  object-fit: contain;
  padding: 18px;
  width: 100%;
}

.image-grid figcaption {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  padding: 14px 18px;
}

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

.activity-item {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.activity-item img {
  aspect-ratio: 16 / 6.6;
  background: white;
  display: block;
  object-fit: cover;
  width: 100%;
}

.activity-item div {
  padding: 22px;
}

.activity-item span {
  color: var(--rust);
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.activity-item p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.timeline {
  border-top: 1px solid var(--line);
  display: grid;
}

.timeline article {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 28px 0;
}

.timeline span {
  color: var(--rust);
  font-size: 0.86rem;
  font-weight: 800;
}

.timeline p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.extra-callout .button {
  margin-top: 10px;
}

.extra-page .extra-hero {
  min-height: 44vh;
  padding-bottom: 36px;
}

.extra-page h1 {
  margin-bottom: 18px;
}

.archive-section {
  padding-top: 36px;
}

.post-archive {
  border-top: 1px solid var(--line);
  display: grid;
}

.post-archive a {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 118px minmax(0, 1fr);
  padding: 18px 0;
}

.post-archive a:hover strong {
  color: var(--accent-strong);
}

.post-archive span {
  color: var(--rust);
  font-size: 0.86rem;
  font-weight: 800;
}

.post-archive strong {
  font-size: 1.05rem;
  line-height: 1.35;
}

.post-shell {
  max-width: 980px;
  padding-top: 56px;
}

.back-link {
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 800;
  margin-bottom: 28px;
}

.markdown-article {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 58px);
}

.markdown-article h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.02;
  margin-bottom: 26px;
}

.markdown-body {
  color: #2b2f35;
  font-size: 1.02rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  line-height: 1.18;
  margin: 2.1em 0 0.65em;
}

.markdown-body h2 {
  border-top: 1px solid var(--line);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  padding-top: 1.15em;
}

.markdown-body h3 {
  font-size: 1.35rem;
}

.markdown-body p,
.markdown-body li {
  color: #333941;
}

.markdown-body a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-body img {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 22px auto;
  max-width: 100%;
  padding: 8px;
}

.markdown-body pre {
  background: #17191d;
  border-radius: 8px;
  color: white;
  overflow-x: auto;
  padding: 18px;
}

.markdown-body code {
  background: rgba(28, 29, 32, 0.08);
  border-radius: 5px;
  font-size: 0.92em;
  padding: 0.14em 0.35em;
}

.markdown-body pre code {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.markdown-body blockquote {
  border-left: 4px solid var(--accent);
  color: var(--muted);
  margin: 28px 0;
  padding-left: 18px;
}

.markdown-body table {
  border-collapse: collapse;
  display: block;
  margin: 24px 0;
  overflow-x: auto;
  width: 100%;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.contact {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 52px;
  grid-template-columns: 0.8fr 1.2fr;
}

.contact-links {
  display: grid;
  gap: 14px;
}

.contact-links a {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  display: flex;
  gap: 10px;
  font-weight: 800;
  padding: 16px 18px;
  word-break: break-word;
}

.contact-links img {
  border-radius: 5px;
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.92rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px clamp(20px, 5vw, 72px) 44px;
}

.footer a {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero,
  .split,
  .contact,
  .research-feature {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .activity-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .section {
    padding-bottom: 58px;
    padding-top: 58px;
  }

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

  .project-item {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .post-archive a {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .research-visual {
    min-height: 300px;
  }

  .node {
    font-size: 0.78rem;
    min-height: 48px;
    width: 116px;
  }

  .node-main {
    width: 132px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
}
