:root {
  --ink: #20302a;
  --muted: #5f6f68;
  --paper: #fff8e8;
  --paper-strong: #fff1c6;
  --sky: #bfe8ff;
  --sky-deep: #78bfe6;
  --leaf: #2f8e5a;
  --leaf-dark: #155d3a;
  --sprout: #8bc34a;
  --gold: #f1ba3a;
  --berry: #b63f62;
  --coral: #ee765f;
  --soil: #66503b;
  --line: rgba(32, 48, 42, 0.16);
  --shadow: 0 18px 46px rgba(43, 72, 58, 0.18);
  --radius: 8px;
  --nav-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, var(--sky) 0%, #dff4fb 34%, #f8efd9 68%, #d8c19c 100%);
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

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

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

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 5vw, 64px);
  background: rgba(255, 248, 232, 0.82);
  border-bottom: 1px solid rgba(32, 48, 42, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff8e8;
  font-weight: 900;
  background: var(--leaf-dark);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50% 50% 50% 12%;
  box-shadow: 0 8px 22px rgba(21, 93, 58, 0.22);
  transform: rotate(-12deg);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

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

.nav-links a {
  padding: 10px 13px;
  color: #304a3f;
  font-size: 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--leaf-dark);
  background: rgba(47, 142, 90, 0.1);
  border-color: rgba(47, 142, 90, 0.2);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: #fff8e8;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
}

.section-tabs {
  position: fixed;
  z-index: 35;
  top: 50%;
  right: clamp(14px, 3vw, 34px);
  display: grid;
  width: 128px;
  gap: 4px;
  padding: 8px;
  background: rgba(255, 248, 232, 0.9);
  border: 1px solid rgba(32, 48, 42, 0.14);
  border-radius: 10px;
  box-shadow: 0 16px 38px rgba(43, 72, 58, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(16px);
  transform: translateY(-50%);
}

.section-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  color: #304a3f;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.section-tab:hover,
.section-tab.active {
  color: var(--leaf-dark);
  background: rgba(47, 142, 90, 0.09);
  border-color: rgba(47, 142, 90, 0.2);
}

.section-tab.active {
  color: #fff8e8;
  background: var(--leaf-dark);
  border-color: var(--leaf-dark);
  box-shadow: inset 3px 0 0 var(--gold), 0 6px 14px rgba(17, 102, 64, 0.18);
}

.storybook {
  overflow: visible;
}

.chapter {
  position: relative;
  min-height: 100svh;
  overflow: visible;
  padding: calc(var(--nav-height) + 34px) 0 64px;
}

.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, transparent, black 16%, black 84%, transparent);
}

.chapter-inner {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 220px));
  margin: 0 auto 0 clamp(22px, 9vw, 140px);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 80px);
  min-height: calc(100svh - 180px);
}

.intro-copy h1,
.section-heading h2,
.contact-footer h2 {
  margin: 0;
  max-width: 900px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 800;
  line-height: 1.05;
}

.intro-copy h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.intro-copy {
  position: relative;
  isolation: isolate;
  padding-right: clamp(0px, 20vw, 280px);
}

.intro-portrait {
  position: absolute;
  z-index: -1;
  right: max(-4vw, -44px);
  bottom: -120px;
  width: min(42vw, 520px);
  max-height: 78svh;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0.34;
  filter: saturate(0.92) contrast(0.96);
  -webkit-mask-image: radial-gradient(ellipse at 56% 48%, black 0 48%, rgba(0, 0, 0, 0.72) 62%, transparent 82%);
  mask-image: radial-gradient(ellipse at 56% 48%, black 0 48%, rgba(0, 0, 0, 0.72) 62%, transparent 82%);
  pointer-events: none;
}

.section-heading h2,
.contact-footer h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
}

.chapter-kicker {
  display: none;
}

.lead,
.section-heading p,
.contact-footer p,
.intro-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.lead {
  max-width: 740px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}

.hero-metrics span {
  min-height: 104px;
  padding: 16px;
  background: rgba(255, 248, 232, 0.82);
  border: 1px solid rgba(32, 48, 42, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 8px;
  color: var(--leaf-dark);
  font-size: 1.55rem;
}

.bean-stage {
  display: none;
}

.cloud {
  position: absolute;
  height: 64px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(74, 140, 176, 0.14);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 18px;
  width: 78px;
  height: 78px;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  left: 26px;
}

.cloud::after {
  right: 36px;
  width: 96px;
  height: 96px;
}

.cloud-a {
  top: 24px;
  right: 80px;
  width: 220px;
  animation: drift 10s ease-in-out infinite;
}

.cloud-b {
  top: 118px;
  left: 18px;
  width: 170px;
  opacity: 0.72;
  animation: drift 12s ease-in-out infinite reverse;
}

.giant-vine {
  position: absolute;
  inset: 70px 0 0;
}

.stem {
  position: absolute;
  right: 48%;
  bottom: -80px;
  width: 34px;
  height: 560px;
  background: linear-gradient(90deg, var(--leaf-dark), var(--leaf), var(--sprout));
  border: 2px solid rgba(16, 76, 48, 0.35);
  border-radius: 999px;
  box-shadow: inset 8px 0 0 rgba(255, 255, 255, 0.12);
  transform: rotate(5deg);
}

.stem::before,
.stem::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 160px;
  height: 22px;
  background: var(--leaf-dark);
  border-radius: 999px;
  transform-origin: left center;
}

.stem::before {
  top: 158px;
  transform: rotate(-38deg);
}

.stem::after {
  top: 334px;
  transform: rotate(34deg);
}

.leaf,
.bean-pod {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 172px;
  height: 112px;
  color: #fff8e8;
  font-weight: 900;
  border: 2px solid rgba(13, 77, 47, 0.38);
  cursor: pointer;
  box-shadow: 0 18px 28px rgba(26, 91, 58, 0.24);
  transition: transform 180ms ease, filter 180ms ease;
}

.leaf:hover,
.bean-pod:hover {
  filter: saturate(1.08);
  transform: translateY(-4px) rotate(var(--tilt));
}

.leaf span,
.bean-pod span {
  padding: 8px 12px;
  background: rgba(18, 58, 42, 0.46);
  border-radius: 999px;
}

.leaf-one {
  --tilt: -18deg;
  top: 210px;
  right: 48%;
  background: linear-gradient(135deg, var(--leaf), var(--leaf-dark));
  border-radius: 88% 12% 88% 18%;
  transform: rotate(-18deg);
}

.leaf-two {
  --tilt: 18deg;
  top: 350px;
  left: 42%;
  background: linear-gradient(135deg, #55a862, var(--leaf-dark));
  border-radius: 12% 88% 18% 88%;
  transform: rotate(18deg);
}

.bean-pod {
  --tilt: -8deg;
  top: 112px;
  left: 45%;
  width: 126px;
  height: 160px;
  background: linear-gradient(160deg, #e8c95d, #86a842 62%, #2f8e5a);
  border-radius: 54% 46% 48% 52%;
  transform: rotate(-8deg);
}

.chapter-actions {
  display: none;
}

.section-heading {
  max-width: 860px;
  margin-bottom: 28px;
}

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

.timeline-card,
.work-card,
.school-card,
.project-strip article,
.contact-card {
  background: rgba(255, 248, 232, 0.88);
  border: 1px solid rgba(32, 48, 42, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-card {
  min-height: 334px;
  padding: 20px;
}

.timeline-card.featured {
  grid-column: auto;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.card-head img {
  max-width: 132px;
  max-height: 46px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.card-head .pconline-logo-img {
  max-width: 92px;
  max-height: 34px;
  mix-blend-mode: normal;
}

.logo-wordmark {
  display: inline-grid;
  gap: 2px;
  color: var(--leaf-dark);
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
}

.logo-wordmark small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
}

.pconline-logo {
  color: #1581d9;
}

.card-head span,
.school-card span {
  color: var(--berry);
  font-size: 0.84rem;
  font-weight: 800;
}

.timeline-card h3,
.work-card h3,
.school-card h3,
.project-strip h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.timeline-card p,
.work-card p,
.school-card p,
.project-strip p {
  color: var(--muted);
  line-height: 1.72;
}

.timeline-card ul {
  margin: 16px 0 0;
  padding-left: 20px;
  color: #385044;
  line-height: 1.7;
}

.impact-list {
  display: none;
}

.impact-list div {
  padding: 12px;
  background: rgba(47, 142, 90, 0.1);
  border: 1px solid rgba(47, 142, 90, 0.18);
  border-radius: var(--radius);
}

.impact-list dt {
  color: var(--leaf-dark);
  font-weight: 900;
}

.impact-list dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.portfolio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab {
  min-height: 42px;
  padding: 9px 16px;
  color: var(--ink);
  background: rgba(255, 248, 232, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  color: #fff8e8;
  background: var(--berry);
  border-color: transparent;
}

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

.work-card {
  display: flex;
  min-height: 352px;
  padding: 18px;
  flex-direction: column;
}

.work-card.hidden {
  display: none;
}

.work-image,
.platform-logos,
.portfolio-icon-stage,
.browser-frame,
.work-seal {
  display: grid;
  min-height: 110px;
  margin-bottom: 16px;
  place-items: center;
  background: linear-gradient(135deg, rgba(120, 191, 230, 0.24), rgba(241, 186, 58, 0.22));
  border: 1px solid rgba(32, 48, 42, 0.12);
  border-radius: var(--radius);
}

.compact-logo img {
  max-width: 78%;
}

.transparent-logo {
  min-height: 96px;
  background: transparent;
  border-color: transparent;
}

.transparent-logo img {
  width: min(86%, 260px);
  max-height: 78px;
  object-fit: contain;
}

.card-logo {
  min-height: 96px;
}

.card-logo img {
  width: min(82%, 240px);
}

.platform-logos {
  grid-template-columns: repeat(4, 56px);
  justify-content: center;
  gap: 12px;
  min-height: 96px;
  background: transparent;
  border-color: transparent;
}

.platform-logo {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: #fff;
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(32, 48, 42, 0.12);
}

.platform-logo.linkedin {
  background: #0a66c2;
}

.platform-logo.instagram {
  background: linear-gradient(135deg, #f9ce34, #ee2a7b 46%, #6228d7);
}

.platform-logo.instagram svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.platform-logo.facebook {
  background: #1877f2;
  font-family: Arial, sans-serif;
  font-size: 2rem;
}

.platform-logo.discord {
  background: #5865f2;
}

.platform-logo.discord svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.portfolio-icon-stage {
  min-height: 96px;
  background: transparent;
  border-color: transparent;
}

.portfolio-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: #fff8e8;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(32, 48, 42, 0.12);
}

.portfolio-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.weibo-icon {
  background: linear-gradient(135deg, #ff7a1a, #e6162d);
}

.gamepad-icon {
  background: linear-gradient(135deg, #116640, #2f8e5a);
}

.scholar-icon {
  background: linear-gradient(135deg, #2d6fb8, #6f77d8);
}

.interaction-icon {
  background: linear-gradient(135deg, #b04d83, #ef7d5b);
}

.browser-frame {
  align-content: start;
  justify-items: start;
  padding: 16px;
  color: var(--leaf-dark);
}

.browser-frame span {
  width: 48px;
  height: 10px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 5px 5px, var(--coral) 0 5px, transparent 6px),
    radial-gradient(circle at 24px 5px, var(--gold) 0 5px, transparent 6px),
    radial-gradient(circle at 43px 5px, var(--leaf) 0 5px, transparent 6px);
}

.browser-frame strong {
  font-size: 1.35rem;
}

.browser-frame p {
  margin: 7px 0 0;
}

.work-seal {
  color: #fff8e8;
  font-size: 1.42rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--berry), var(--coral));
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.link-row a {
  padding: 8px 11px;
  color: var(--leaf-dark);
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(47, 142, 90, 0.12);
  border: 1px solid rgba(47, 142, 90, 0.18);
  border-radius: 999px;
}

.root-layout {
  padding-top: 20px;
}

.root-art {
  display: none;
}

.soil {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 78px;
  background: linear-gradient(180deg, #8a6b48, var(--soil));
  border-radius: 50% 50% 0 0;
}

.root {
  position: absolute;
  bottom: 54px;
  left: 50%;
  width: 260px;
  height: 28px;
  background: var(--soil);
  border-radius: 999px;
  transform-origin: left center;
}

.root-a {
  transform: rotate(18deg);
}

.root-b {
  transform: rotate(158deg);
}

.root-c {
  width: 190px;
  transform: rotate(84deg);
}

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

.school-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.school-card img {
  width: 122px;
  height: 92px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.project-strip {
  display: none;
}

.contact-footer {
  position: relative;
  display: grid;
  min-height: auto;
  padding: 22px 0 24px;
  align-items: center;
  color: #fff8e8;
  background:
    linear-gradient(180deg, rgba(102, 80, 59, 0.98), rgba(44, 64, 48, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255, 248, 232, 0.05) 44px 45px);
}

.contact-inner {
  display: grid;
  width: min(1080px, calc(100% - 250px));
  margin: 0 auto 0 clamp(24px, 5vw, 74px);
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 1.9fr);
  align-items: center;
  gap: 22px;
}

.contact-footer h2 {
  margin-bottom: 6px;
  font-size: 2rem;
}

.contact-footer .chapter-kicker,
.contact-footer p {
  color: rgba(255, 248, 232, 0.78);
}

.contact-footer p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 64px;
  padding: 10px;
  align-items: center;
  align-content: center;
  column-gap: 9px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.contact-card span {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 0;
  place-items: center;
  color: #fff8e8;
  font-weight: 900;
  background: var(--leaf-dark);
  border-radius: 50%;
  grid-row: 1 / 3;
}

.contact-card svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.contact-card strong,
.contact-card small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  grid-column: 2;
}

.contact-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.email-card small {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  font-size: clamp(0.66rem, 0.72vw, 0.74rem);
}

.bean-modal {
  width: min(720px, calc(100% - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(32, 48, 42, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 26px 80px rgba(20, 32, 26, 0.34);
}

.bean-modal::backdrop {
  background: rgba(21, 38, 31, 0.45);
  backdrop-filter: blur(4px);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.modal-content {
  padding: 34px;
}

.modal-content h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
}

.modal-content p,
.skill-map {
  color: var(--muted);
  line-height: 1.82;
}

.portrait {
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
  object-position: center top;
}

.skill-map {
  margin: 0;
  padding-left: 20px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  color: #fff8e8;
  background: var(--leaf-dark);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(21, 93, 58, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(24px);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg) translateX(74px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(74px) rotate(-360deg);
  }
}

@media (max-width: 1100px) {
  .contact-inner {
    width: min(100% - 170px, 860px);
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

@media (max-width: 980px) {
  :root {
    --nav-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: 14px;
    left: 14px;
    display: grid;
    padding: 12px;
    background: rgba(255, 248, 232, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  body.menu-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    border-radius: var(--radius);
  }

  .chapter {
    min-height: 100svh;
    padding: calc(var(--nav-height) + 26px) 0 54px;
  }

  .chapter-inner {
    width: min(100% - 148px, 860px);
    margin-left: 18px;
  }

  .intro-layout,
  .experience-grid,
  .portfolio-grid,
  .education-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .intro-layout {
    min-height: calc(100svh - 146px);
  }

  .intro-copy h1 {
    font-size: 3rem;
  }

  .section-heading h2,
  .contact-footer h2 {
    font-size: 2.35rem;
  }

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

  .hero-metrics span {
    min-height: 78px;
    padding: 12px;
  }

  .section-tabs {
    right: 10px;
    width: 98px;
    padding: 6px;
  }

  .section-tab {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  .timeline-card.featured {
    grid-column: auto;
  }

  .school-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .school-card img {
    width: 84px;
    height: 72px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
  }

  .contact-footer h2 {
    font-size: 1.45rem;
  }

  .contact-footer {
    padding: 18px 0;
  }

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

@media (max-width: 620px) {
  body::after {
    content: "";
    position: fixed;
    z-index: 0;
    right: -26vw;
    bottom: -9vh;
    width: 118vw;
    height: 88vh;
    pointer-events: none;
    background: url("./assets/sooki-portrait-cutout.png") right bottom / contain no-repeat;
    opacity: 0.16;
    filter: saturate(0.92) contrast(0.96);
    -webkit-mask-image: radial-gradient(ellipse at 56% 48%, black 0 52%, rgba(0, 0, 0, 0.62) 68%, transparent 88%);
    mask-image: radial-gradient(ellipse at 56% 48%, black 0 52%, rgba(0, 0, 0, 0.62) 68%, transparent 88%);
  }

  .storybook {
    position: relative;
    z-index: 1;
  }

  .topbar {
    padding: 10px 14px;
  }

  .section-tabs {
    display: none;
  }

  .chapter {
    min-height: auto;
    scroll-margin-top: var(--nav-height);
    padding: 34px 0 30px;
  }

  .chapter-inner,
  .contact-inner {
    width: calc(100% - 28px);
    margin-inline: 14px;
  }

  .intro-chapter {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 30px);
    padding-bottom: 28px;
  }

  .intro-layout {
    min-height: auto;
    align-items: start;
  }

  .intro-copy {
    display: grid;
    min-height: auto;
    align-content: start;
  }

  .intro-copy h1 {
    max-width: 100%;
    font-size: clamp(2.2rem, 11vw, 2.72rem);
    line-height: 1.08;
  }

  .section-heading h2,
  .contact-footer h2 {
    font-size: 1.9rem;
  }

  .lead,
  .section-heading p,
  .contact-footer p,
  .intro-copy p {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .intro-copy {
    padding-right: 0;
  }

  .intro-portrait {
    display: none;
  }

  .hero-metrics {
    gap: 6px;
    margin-top: 18px;
  }

  .hero-metrics span {
    min-width: 0;
    min-height: 82px;
    padding: 10px 8px;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .hero-metrics strong {
    font-size: clamp(1.15rem, 5.2vw, 1.34rem);
    line-height: 1;
  }

  .portfolio-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab {
    padding-inline: 10px;
  }

  .card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-card {
    min-height: 58px;
    padding: 9px;
  }

  .contact-footer {
    padding: 24px 0 26px;
  }

  .contact-inner {
    gap: 18px;
  }

  .contact-card {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 8px;
  }

  .email-card small {
    font-size: clamp(0.58rem, 3vw, 0.68rem);
  }

  .modal-content {
    padding: 26px 20px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
