:root {
  --paper: #f2efe7;
  --paper-light: #fbfaf6;
  --ink: #0d1b26;
  --ink-soft: #263642;
  --muted: #65717a;
  --blue: #164c70;
  --cyan: #08a4cf;
  --acid: #d9f36a;
  --line: rgba(13, 27, 38, 0.14);
  --shadow: 0 24px 70px rgba(16, 40, 56, 0.14);
  --radius-lg: 30px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

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

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(75px);
  pointer-events: none;
}

.ambient--one {
  top: 12vh;
  right: -38vw;
  width: 78vw;
  aspect-ratio: 1;
  background: rgba(8, 164, 207, 0.15);
}

.ambient--two {
  top: 75vh;
  left: -35vw;
  width: 70vw;
  aspect-ratio: 1;
  background: rgba(217, 243, 106, 0.16);
}

.site-shell,
.w-full {
  width: 100%;
}

.site-shell {
  max-width: 100%;
  overflow-x: hidden;
}

.max-w-5xl {
  max-width: 64rem;
}

.page-width {
  width: min(100% - 28px, 1240px);
  margin-inline: auto;
}

.top-nav {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 50%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: calc(100% - 20px);
  min-height: 60px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: rgba(251, 250, 246, 0.84);
  box-shadow: 0 12px 35px rgba(13, 27, 38, 0.1);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  font-size: 14px;
  font-weight: 760;
}

.nav-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.1em;
}

.nav-links {
  display: none;
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 730;
}

.hero {
  display: grid;
  gap: 58px;
  min-height: 100svh;
  padding-block: 122px 92px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow,
.card-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 24px 0 0;
  font-size: clamp(2.85rem, 13vw, 4.2rem);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  color: var(--blue);
}

.hero-intro {
  max-width: 42rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.82;
}

.hero-actions,
.contact-actions {
  display: grid;
  gap: 11px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 740;
  transition: transform 240ms ease, background-color 240ms ease, color 240ms ease;
}

.button:active {
  transform: scale(0.98);
}

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

.button--secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.46);
  color: var(--ink);
}

.hero-visual {
  position: relative;
  min-height: 460px;
}

.portrait-orbit {
  position: absolute;
  top: -18px;
  right: -20%;
  width: 104%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--acid), rgba(217, 243, 106, 0.15) 58%, transparent 70%);
  filter: blur(6px);
}

.portrait-card {
  position: relative;
  width: min(89vw, 390px);
  margin: 0 0 0 auto;
  padding: 10px;
  overflow: hidden;
  border-radius: 190px 190px 26px 26px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
  transform-origin: center bottom;
}

.portrait-media {
  overflow: hidden;
  border-radius: 180px 180px 18px 18px;
  background: var(--cyan);
}

.portrait-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform, opacity, filter;
}

.portrait-card:hover .portrait-image {
  transform: scale(1.035);
}

.portrait-card figcaption {
  display: grid;
  gap: 5px;
  padding: 14px 8px 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--ink);
  color: #fff;
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  min-height: 78px;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  padding-inline: 22px;
  font-size: 15px;
  font-weight: 680;
  white-space: nowrap;
}

.marquee-track i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.section {
  padding-block: 112px;
}

.section-heading {
  max-width: 920px;
  margin-bottom: 48px;
}

.section-heading h2,
.case-intro h2,
.contact-inner h2 {
  margin: 18px 0 0;
  font-size: clamp(2.35rem, 10.5vw, 4.7rem);
  font-weight: 740;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.bento-grid {
  display: grid;
  grid-auto-flow: dense;
  gap: 12px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.46);
}

.bento-card h3 {
  max-width: 13ch;
  margin: auto 0 18px;
  font-size: clamp(1.8rem, 8vw, 2.75rem);
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.bento-card > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.bento-card--lead {
  min-height: 360px;
  background: var(--blue);
  color: #fff;
}

.bento-card--lead .card-kicker,
.bento-card--lead > p:last-child {
  color: rgba(255, 255, 255, 0.68);
}

.bento-card--system {
  min-height: 330px;
  background: var(--acid);
}

.experience-section {
  background: var(--paper-light);
}

.section-heading--compact {
  max-width: 860px;
}

.experience-accordion {
  display: grid;
  gap: 12px;
}

.experience-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 16px 42px rgba(16, 40, 56, 0.07);
}

.experience-card summary {
  position: relative;
  display: grid;
  gap: 16px;
  min-height: 170px;
  padding: 26px 62px 26px 26px;
  cursor: pointer;
  list-style: none;
}

.experience-card summary::-webkit-details-marker {
  display: none;
}

.experience-time {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.05em;
}

.experience-heading {
  display: grid;
  align-self: end;
  gap: 8px;
}

.experience-heading strong {
  font-size: clamp(1.35rem, 6vw, 2rem);
  line-height: 1.2;
}

.experience-heading small {
  color: var(--blue);
  font-size: 14px;
  font-weight: 720;
}

.summary-toggle {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.summary-toggle::before,
.summary-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: var(--ink);
  content: "";
  transform: translate(-50%, -50%);
}

.summary-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 220ms ease;
}

.experience-card[open] .summary-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.experience-body {
  display: grid;
  gap: 24px;
  padding: 0 26px 30px;
}

.experience-body > div {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.experience-body h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.experience-body p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.72;
}

.projects-section {
  background: var(--paper);
}

.case-layout {
  display: grid;
  gap: 48px;
}

.case-intro > p:last-child {
  max-width: 35rem;
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.case-gallery {
  min-width: 0;
}

.case-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 14px 18px;
  margin-inline: -14px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.case-list::-webkit-scrollbar {
  display: none;
}

.case-card {
  flex: 0 0 91%;
  min-height: 560px;
  padding: 28px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  scroll-snap-align: center;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.case-card:hover {
  transform: translateY(-7px);
}

.case-card--dark {
  background: var(--blue);
  color: #fff;
}

.case-card--acid {
  background: var(--acid);
  color: var(--ink);
}

.case-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  font-size: 12px;
  font-weight: 720;
}

.case-topline time {
  opacity: 0.62;
  white-space: nowrap;
}

.case-card h3 {
  max-width: 15ch;
  margin: 52px 0 50px;
  font-size: clamp(2rem, 8.5vw, 3.3rem);
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.case-flow {
  display: grid;
  gap: 18px;
}

.case-flow > div {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid currentColor;
}

.case-flow span {
  font-size: 12px;
  font-weight: 760;
  opacity: 0.62;
}

.case-flow p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  opacity: 0.82;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  gap: 7px;
}

.carousel-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(13, 27, 38, 0.25);
}

.carousel-dots .is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--blue);
}

.profile-section {
  background: #dceaf1;
}

.profile-grid {
  display: grid;
  gap: 12px;
}

.profile-panel {
  padding: 28px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
}

.education-item {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.education-item time {
  color: var(--muted);
  font-size: 13px;
}

.education-item h2,
.profile-panel--skills h2 {
  margin: 0 0 7px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.education-item p,
.profile-panel--skills p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.profile-panel--skills > div {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.contact-section {
  padding-block: 116px 88px;
  background: var(--ink);
  color: #fff;
}

.contact-inner > p {
  max-width: 40rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.7;
}

.contact-inner h2 {
  max-width: 900px;
  font-size: clamp(3.9rem, 18vw, 8.2rem);
}

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

.button--outline {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.contact-email {
  display: block;
  margin-top: 64px;
  padding-top: 24px;
  overflow-wrap: anywhere;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.68);
}

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

.footer a {
  padding: 12px 0 12px 16px;
}

.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 100svh;
  padding-block: 80px;
}

.not-found h1 {
  max-width: 12ch;
  margin: 22px 0 0;
  font-size: clamp(3rem, 13vw, 6rem);
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.not-found > p:not(.eyebrow) {
  margin: 26px 0 30px;
  color: var(--muted);
  line-height: 1.75;
}

@media (min-width: 700px) {
  .page-width {
    width: min(100% - 64px, 1240px);
  }

  .hero-actions,
  .contact-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .button {
    min-width: 190px;
  }

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

@media (min-width: 960px) {
  .top-nav {
    top: 18px;
    grid-template-columns: 1fr auto 1fr;
    width: min(1180px, calc(100% - 48px));
    min-height: 66px;
    padding: 10px 14px;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    color: var(--muted);
    font-size: 14px;
  }

  .nav-links a {
    transition: color 220ms ease;
  }

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

  .nav-contact {
    justify-self: end;
    min-height: 44px;
    padding-inline: 18px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
    align-items: center;
    gap: 70px;
    min-height: 920px;
    padding-block: 158px 108px;
  }

  .hero h1 {
    font-size: clamp(4rem, 5.4vw, 5.1rem);
  }

  .hero-intro {
    font-size: 19px;
  }

  .hero-visual {
    min-height: 610px;
  }

  .portrait-orbit {
    top: 10px;
    right: -60px;
    width: 510px;
  }

  .portrait-card {
    width: min(100%, 438px);
    padding: 13px;
  }

  .portrait-card figcaption {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 18px 10px 7px;
  }

  .section {
    padding-block: 164px;
  }

  .section-heading {
    margin-bottom: 72px;
  }

  .bento-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
  }

  .bento-card {
    padding: 34px;
  }

  .bento-card--lead {
    grid-column: span 7;
    min-height: 390px;
  }

  .bento-card--system {
    grid-column: span 5;
    min-height: 390px;
  }

  .bento-card--small {
    grid-column: span 4;
    min-height: 300px;
  }

  .experience-accordion {
    display: flex;
    align-items: stretch;
    min-height: 610px;
  }

  .experience-card {
    flex: 1;
    min-width: 220px;
    transition: flex 600ms cubic-bezier(0.2, 0.7, 0.2, 1), background-color 300ms ease;
  }

  .experience-card[open] {
    flex: 2.15;
  }

  .experience-card summary {
    min-height: 210px;
    padding: 34px 76px 34px 34px;
  }

  .experience-card:not([open]) summary {
    min-height: 100%;
  }

  .experience-card:not([open]) .experience-heading strong {
    max-width: 12ch;
  }

  .experience-body {
    padding: 0 34px 36px;
  }

  .case-layout {
    grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1.32fr);
    align-items: start;
    gap: 96px;
  }

  .case-intro {
    padding-top: 8px;
  }

  .case-list {
    display: grid;
    gap: 22px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .case-card {
    min-height: 590px;
    padding: 42px;
  }

  .case-card h3 {
    margin-block: 74px 66px;
  }

  .carousel-controls {
    display: none;
  }

  .profile-panel {
    min-height: 530px;
    padding: 44px;
  }

  .education-item {
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding-block: 32px;
  }

  .contact-section {
    padding-block: 164px 110px;
  }

  .contact-inner h2 {
    margin-top: 28px;
  }

  .button:hover {
    transform: translateY(-3px);
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .top-nav,
  .marquee,
  .carousel-controls,
  .contact-section,
  .footer,
  .ambient {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .hero,
  .section {
    min-height: auto;
    padding-block: 28px;
  }

  .experience-card,
  .case-card,
  .bento-card {
    break-inside: avoid;
  }
}
