:root {
  color-scheme: dark;
  --ink: #07111d;
  --ink-soft: #0d1d2c;
  --paper: #edf7f8;
  --muted: #9fb5c0;
  --line: rgba(176, 216, 221, 0.17);
  --cyan: #79e1dc;
  --cyan-soft: rgba(121, 225, 220, 0.13);
  --coral: #ff8f87;
  --gold: #e8c873;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 0%, rgba(50, 150, 166, 0.18), transparent 35rem),
    linear-gradient(rgba(121, 225, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 225, 220, 0.035) 1px, transparent 1px),
    var(--ink);
  background-size: auto, 42px 42px, 42px 42px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; }

img { display: block; max-width: 100%; }

.shell {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(121, 225, 220, 0.5);
  border-radius: 11px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.nav-note {
  color: var(--muted);
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(290px, 0.82fr);
  gap: 68px;
  align-items: center;
  min-height: 610px;
  padding: 88px 0 78px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-name {
  color: transparent;
  background: linear-gradient(110deg, var(--paper) 12%, var(--cyan) 70%, #b8a7ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.lede {
  max-width: 650px;
  margin-bottom: 28px;
  color: #c4d3da;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  border: 1px solid rgba(121, 225, 220, 0.62);
  border-radius: 12px;
  color: #041519;
  background: var(--cyan);
  text-decoration: none;
  font-weight: 760;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(83, 214, 207, 0.2); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.button.secondary {
  color: var(--paper);
  background: transparent;
  border-color: var(--line);
}

.identity-card,
.project-card,
.metric,
.step,
.boundary {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 34, 50, 0.94), rgba(8, 21, 33, 0.83));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.identity-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 22px;
}

.identity-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--coral), var(--gold));
  content: "";
}

.identity-card small { color: var(--muted); }

.identity-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.identity-card p { margin-bottom: 22px; color: #b9cbd3; }

.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.signal,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbe2e5;
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
}

.section { padding: 78px 0; border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.section-head p { max-width: 600px; margin-bottom: 0; color: var(--muted); }

.project-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 32px;
  border-radius: 20px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.project-card:hover { transform: translateY(-3px); border-color: rgba(121, 225, 220, 0.52); }
.project-card h3 { margin-bottom: 8px; font-size: 26px; letter-spacing: -0.025em; }
.project-card p { max-width: 720px; margin-bottom: 0; color: var(--muted); }
.arrow { color: var(--cyan); font-size: 28px; }

.subhero { padding: 78px 0 44px; }
.subhero h1 { max-width: 920px; font-size: clamp(3rem, 7vw, 6.2rem); }
.subhero .lede { max-width: 840px; }

.boundary {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 34px;
  padding: 20px 22px;
  border-color: rgba(121, 225, 220, 0.36);
  border-radius: 16px;
}

.boundary-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-weight: 800;
}

.boundary strong { display: block; margin-bottom: 2px; }
.boundary p { margin: 0; color: var(--muted); }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 34px 0 56px;
}

.metric { padding: 22px; border-radius: 16px; }
.metric strong { display: block; color: var(--cyan); font-size: 30px; letter-spacing: -0.04em; }
.metric span { color: var(--muted); font-size: 14px; }

.figure-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.figure-wrap img { width: 100%; height: auto; }

.caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.step { padding: 22px; border-radius: 16px; }
.step b { display: block; margin-bottom: 12px; color: var(--coral); font-size: 13px; letter-spacing: 0.08em; }
.step h3 { margin-bottom: 8px; font-size: 19px; }
.step p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 34px; min-height: auto; padding: 68px 0; }
  .metrics, .steps { grid-template-columns: 1fr 1fr; }
  .section-head { display: block; }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 66px; }
  .nav-note { display: none; }
  h1 { font-size: clamp(2.75rem, 15vw, 4.25rem); }
  .hero, .subhero { padding-top: 52px; }
  .section { padding: 58px 0; }
  .metrics, .steps { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; padding: 24px; }
  .arrow { display: none; }
  .footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Minimal personal entry page. The project pages retain the research-oriented theme above. */
.minimal-home {
  display: grid;
  min-height: 100svh;
  grid-template-rows: auto 1fr auto;
  color: #111416;
  background: #f4f2ec;
}

.mini-nav,
.mini-main,
.mini-footer {
  width: min(calc(100% - 64px), 1320px);
  margin-inline: auto;
}

.mini-nav {
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(17, 20, 22, 0.22);
  color: #555a5c;
  font-size: 14px;
}

.mini-wordmark {
  color: #111416;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mini-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
  padding: clamp(42px, 7vh, 84px) 0 clamp(42px, 7vh, 76px);
}

.mini-kicker {
  margin-bottom: 22px;
  color: #5c6264;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.minimal-home h1 {
  max-width: 840px;
  margin: 0;
  color: #111416;
  font-size: clamp(3.25rem, 7.2vw, 7.2rem);
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.mini-fields {
  margin: 34px 0 0;
  color: #555a5c;
  font-size: 16px;
}

.mini-projects {
  position: relative;
  align-self: center;
  width: 216px;
}

.mini-work-trigger {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #111416;
  color: #111416;
  background: transparent;
  font: inherit;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
}

.mini-work-trigger span:last-child {
  font-size: 19px;
  transition: transform 180ms ease;
}

.mini-projects[data-open="true"] .mini-work-trigger span:last-child { transform: rotate(45deg); }

.mini-project-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 10;
  width: min(330px, calc(100vw - 36px));
  padding: 8px;
  border: 1px solid rgba(17, 20, 22, 0.24);
  background: rgba(244, 242, 236, 0.98);
  box-shadow: 0 20px 55px rgba(17, 20, 22, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.mini-projects:hover .mini-project-list,
.mini-projects:focus-within .mini-project-list,
.mini-projects[data-open="true"] .mini-project-list {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mini-project-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 13px;
  color: #111416;
  text-decoration: none;
  transition: background 150ms ease;
}

.mini-project-list a:hover { background: #e7e4dc; }
.mini-project-list b { display: block; font-size: 15px; }
.mini-project-list small { display: block; margin-top: 3px; color: #676c6e; font-size: 12px; }

.mini-project-more {
  display: flex;
  justify-content: space-between;
  padding: 12px 13px 8px;
  border-top: 1px solid rgba(17, 20, 22, 0.15);
  color: #8b8d8d;
  font-size: 12px;
}

.mini-project-more i { font-style: normal; letter-spacing: 0.16em; }

.mini-footer {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(17, 20, 22, 0.22);
  color: #676c6e;
  font-size: 13px;
}

@media (max-width: 700px) {
  .mini-nav,
  .mini-main,
  .mini-footer { width: min(calc(100% - 36px), 1320px); }
  .mini-main { grid-template-columns: 1fr; align-items: center; padding-top: 42px; }
  .minimal-home h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .mini-projects { width: 100%; margin-top: 18px; }
  .mini-project-list { right: auto; left: 0; bottom: calc(100% + 10px); }
}
